diff options
Diffstat (limited to 'usr.bin/tail')
-rw-r--r-- | usr.bin/tail/forward.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tail/forward.c b/usr.bin/tail/forward.c index ffca06a..cd1980f 100644 --- a/usr.bin/tail/forward.c +++ b/usr.bin/tail/forward.c @@ -204,7 +204,7 @@ forward(fp, style, off, sbp) n++; } EV_SET(&ev[n], fileno(fp), EVFILT_READ, - EV_ADD | EV_ENABLE, 0, 0, 0); + EV_ADD | EV_ENABLE | EV_CLEAR, 0, 0, 0); n++; if (kevent(kq, ev, n, NULL, 0, &ts) < 0) { @@ -251,6 +251,8 @@ forward(fp, style, off, sbp) *sbp = sb2; if (kq != -1) action = ADD_EVENTS; + } else if (kq != -1) { + action = USE_KQUEUE; } } break; |