aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
Diffstat (limited to 'toys')
-rw-r--r--toys/posix/tail.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/tail.c b/toys/posix/tail.c
index a00bfa0c..d1c62508 100644
--- a/toys/posix/tail.c
+++ b/toys/posix/tail.c
@@ -245,7 +245,7 @@ void tail_main(void)
loopfiles_rw(args, O_RDONLY|(O_CLOEXEC*!(toys.optflags&FLAG_f)),
0, 0, do_tail);
- if (toys.optflags & FLAG_f) {
+ if ((toys.optflags & FLAG_f) && TT.file_no) {
int len, last_fd = TT.files[(TT.file_no-1)*2], i, fd;
struct inotify_event ev;