Blast from the past. This patch seemed reasonable to me at the time, but I
notice you didn't commit it. Any reason why? The issue has just come up
again on -questions.
Doug
Ben Smithurst wrote:
>
> Fred Gilham wrote:
>
> > In 4.1-stable tail -f over NFS polls rather than blocking.
>
> Yes, this is acknowledged in the kqueue() manual page. Try this patch,
> it seems to work for me so I might commit it if no-one objects.
>
> Index: forward.c
> ===================================================================
> RCS file: /usr/cvs/src/usr.bin/tail/forward.c,v
> retrieving revision 1.15
> diff -u -r1.15 forward.c
> --- forward.c 2000/07/18 19:38:38 1.15
> +++ forward.c 2000/09/02 16:16:40
> @@ -40,7 +40,8 @@
> static char sccsid[] = "@(#)forward.c 8.1 (Berkeley) 6/6/93";
> #endif /* not lint */
>
> -#include <sys/types.h>
> +#include <sys/param.h>
> +#include <sys/mount.h>
> #include <sys/stat.h>
> #include <sys/time.h>
> #include <sys/mman.h>
> @@ -96,6 +97,7 @@
> int action = USE_SLEEP;
> struct kevent ev[2];
> struct stat sb2;
> + struct statfs statfsbuf;
>
> switch(style) {
> case FBYTES:
> @@ -170,7 +172,10 @@
> break;
> }
>
> - if (fflag) {
> + if (statfs(fname, &statfsbuf) != 0)
> + err(1, "statfs %s", fname);
> +
> + if (fflag && strcmp(statfsbuf.f_fstypename, "ufs") == 0) {
> kq = kqueue();
> if (kq < 0)
> err(1, "kqueue");
> --
> Ben Smithurst / [EMAIL PROTECTED] / PGP: 0x99392F7D
> FreeBSD Documentation Project /
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-stable" in the body of the message
--
I need someone really bad. Are you really bad?
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message