summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys-utils/flock.14
-rw-r--r--sys-utils/flock.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/sys-utils/flock.1 b/sys-utils/flock.1
index 276d72633..f69040190 100644
--- a/sys-utils/flock.1
+++ b/sys-utils/flock.1
@@ -103,7 +103,9 @@ Fail if the lock cannot be acquired within
Decimal fractional values are allowed.
See the
.B \-E
-option for the exit code used.
+option for the exit code used. The zero number of
+.IR seconds
+is interpreted as \fB\-\-nonblock\fR.
.TP
.BR \-V , " \-\-version"
Display version information and exit.
diff --git a/sys-utils/flock.c b/sys-utils/flock.c
index 62c6f7c7c..2550a5be7 100644
--- a/sys-utils/flock.c
+++ b/sys-utils/flock.c
@@ -175,8 +175,6 @@ int main(int argc, char *argv[])
have_timeout = 1;
strtotimeval_or_err(optarg, &timeout.it_value,
_("invalid timeout value"));
- if (timeout.it_value.tv_sec + timeout.it_value.tv_usec == 0)
- errx(EX_USAGE, _("timeout cannot be zero"));
break;
case 'E':
conflict_exit_code = strtos32_or_err(optarg,