Hi folks at misc@ !
I've always missed the feature of GNU tail and FreeBSD tail to follow
multiple files using -f. I was used to monitor the logs on my 3.8 server
using "tail -f /var/log/messages & ; tail -f /var/www/logs/access_log &"
and so on, but wasn't pleased of this workaround. I know, multitail port
does the job, but i didn't want to install it.
So i decided to code a patch, i looked at how FreeBSD handle this issue,
i read style(9) and kqueue(2), and finally the result is here :
http://team.gcu.info/~gaston/openbsd-tail-follow-multiple-files.patch
This patch is against -current userland src/usr.bin/tail. Feel free to
try it and comment it. If someone could review it and verify it, this
would be great. Patched version works like a charm on my server since
two days, and has been tested in most common cases.
Thanks,
Landry
ps: I've submitted this patch too as PR#5092.