diff options
author | jlemon <jlemon@FreeBSD.org> | 2001-06-06 17:47:13 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2001-06-06 17:47:13 +0000 |
commit | 08bbb9b6f587aab8da4bf045d562e7ce4e578b42 (patch) | |
tree | 7a6de3f59fb8114c651ef238fcd3a079525c15f8 /usr.bin | |
parent | bf3a0c1bb10ffc87be85ae3e805b617e9d0e7cc9 (diff) | |
download | FreeBSD-src-08bbb9b6f587aab8da4bf045d562e7ce4e578b42.zip FreeBSD-src-08bbb9b6f587aab8da4bf045d562e7ce4e578b42.tar.gz |
o If the file being tailed is moved back to the original location,
resume using kqueue to monitor it, if possible.
o auto-clear the read filter on EOF; this is needed when tailing a FIFO.
Diffstat (limited to 'usr.bin')
-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; |