From owner-freebsd-current Thu May 24 20:51:33 2001 Delivered-To: freebsd-current@freebsd.org Received: from dt051n37.san.rr.com (dt051n37.san.rr.com [204.210.32.55]) by hub.freebsd.org (Postfix) with ESMTP id 46E9137B422; Thu, 24 May 2001 20:51:30 -0700 (PDT) (envelope-from DougB@DougBarton.net) Received: from DougBarton.net (master [10.0.0.2]) by dt051n37.san.rr.com (8.9.3/8.9.3) with ESMTP id UAA19576; Thu, 24 May 2001 20:51:29 -0700 (PDT) (envelope-from DougB@DougBarton.net) Message-ID: <3B0DD6BD.8E54A5E5@DougBarton.net> Date: Thu, 24 May 2001 20:51:25 -0700 From: Doug Barton Organization: Triborough Bridge & Tunnel Authority X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Ben Smithurst Cc: freebsd-current@FreeBSD.org Subject: Re: tail -f over NFS in -stable References: <200009011622.JAA29262@csla.csl.sri.com> <20000902171753.A43451@magnesium.scientia.demon.co.uk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 > +#include > +#include > #include > #include > #include > @@ -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 / ben@FreeBSD.org / PGP: 0x99392F7D > FreeBSD Documentation Project / > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-stable" in the body of the message -- I need someone really bad. Are you really bad? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message