mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-19 02:29:40 +00:00
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.
This commit is contained in:
parent
3b6e32b01e
commit
a8fb4e2810
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77823
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user