From owner-freebsd-questions Fri May 25 14: 0:53 2001 Delivered-To: freebsd-questions@freebsd.org Received: from dt051n37.san.rr.com (dt051n37.san.rr.com [204.210.32.55]) by hub.freebsd.org (Postfix) with ESMTP id 8F64137B423 for ; Fri, 25 May 2001 14:00:49 -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 OAA29980; Fri, 25 May 2001 14:00:48 -0700 (PDT) (envelope-from DougB@DougBarton.net) Message-ID: <3B0EC800.7648921A@DougBarton.net> Date: Fri, 25 May 2001 14:00:48 -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: boshea@ricochet.net Cc: freebsd-questions@FreeBSD.ORG Subject: Re: tail(1) uses kqueue, which doesn't seem to work on NFS filesystems References: <20010515161052.O1813@shaolin.hq.netapp.com> Content-Type: multipart/mixed; boundary="------------459BFF26323DBF567F3C9BE2" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. --------------459BFF26323DBF567F3C9BE2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Brian O'Shea wrote: > I noticed in the code for tail(1) (src/usr.bin/tail/forward.c) that > there is a local variable in the forward() function called "action" > which seems to control weather or not tail uses sleep or kqueue (it > seems to be assigned one of three values at various times, defined > respectively to be USE_SLEEP, USE_KQUEUE, and ADD_EVENTS). However, it > isn't clear to me from looking at the code if this variable can be used > to disable the use of kqueue. The built in logic should be able to handle this. Can you try the attached patch and see if you're actually using kqueue in your problematic case? Thanks, Doug -- I need someone really bad. Are you really bad? --------------459BFF26323DBF567F3C9BE2 Content-Type: text/plain; charset=us-ascii; name="forward.c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="forward.c.patch" Index: forward.c =================================================================== RCS file: /usr/ncvs/src/usr.bin/tail/forward.c,v retrieving revision 1.25 diff -u -r1.25 forward.c --- forward.c 2001/03/28 13:10:17 1.25 +++ forward.c 2001/05/25 20:56:13 @@ -211,8 +211,10 @@ close(kq); kq = -1; action = USE_SLEEP; + (void)fprintf(stderr, "Using sleep\n"); } else { action = USE_KQUEUE; + (void)fprintf(stderr, "Using kqueue\n"); } break; } --------------459BFF26323DBF567F3C9BE2-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message