[Toybox] [PATCH] tail: support -f on BSD too.

enh enh at google.com
Fri May 24 12:52:57 PDT 2019


i will admit though, i have no idea why this code is using inotify in
the first place. what's the benefit over select/poll? i'm happy to
send a different patch switching to one of those instead. if you let
me know this afternoon, i should be able to do it this afternoon ---
i'm trying my hardest not to break anything before the US long
weekend.

somewhat unrelated, but in the same file: should we remove
CONFIG_TAIL_SEEK? seems like it doesn't really meet the bar for being
something anyone would really want to disable?

On Thu, May 23, 2019 at 4:30 PM enh <enh at google.com> wrote:
>
> Factor out the inotify code and add a kqueue equivalent.
>
> Specifically tested on macOS 10.14, but I assume this works for other
> BSDs too, given that I worked from the FreeBSD man page...
> ---
>  lib/notify.c      | 87 +++++++++++++++++++++++++++++++++++++++++++++++
>  lib/portability.h |  5 +++
>  toys/posix/tail.c | 31 +++++------------
>  3 files changed, 101 insertions(+), 22 deletions(-)
>  create mode 100644 lib/notify.c



More information about the Toybox mailing list