Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 May 2001 14:00:48 -0700
From:      Doug Barton <DougB@DougBarton.net>
To:        boshea@ricochet.net
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: tail(1) uses kqueue, which doesn't seem to work on NFS filesystems
Message-ID:  <3B0EC800.7648921A@DougBarton.net>
References:  <20010515161052.O1813@shaolin.hq.netapp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B0EC800.7648921A>