From owner-freebsd-hackers Wed May 2 16:49:50 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from resnet.uoregon.edu (resnet.uoregon.edu [128.223.122.47]) by hub.freebsd.org (Postfix) with ESMTP id 430E637B43F for ; Wed, 2 May 2001 16:49:35 -0700 (PDT) (envelope-from dwhite@resnet.uoregon.edu) Received: from localhost (dwhite@localhost) by resnet.uoregon.edu (8.10.1/8.10.1) with ESMTP id f42NnVP84816; Wed, 2 May 2001 16:49:31 -0700 (PDT) Date: Wed, 2 May 2001 16:49:30 -0700 (PDT) From: Doug White To: Dominic Marks Cc: Subject: Re: KEvent doesnt return and KEvent sample troubles In-Reply-To: Message-ID: X-All-Your-Base: are belong to us MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 2 May 2001, Dominic Marks wrote: > I've been looking to start using the KEvent system and I've been > experimenting with it. However I've been having several problems, with my > own code as well as samples from http://www.flugsvamp.org. > > It appears I am able to create the correct structure's and register the > events. However the event never returns and never responds to any action. > For example if I use a sample which monitors the actions on a file I can > read from, and write to the file and it shows no sign of noticing. For that you want status change notifications. You've registerted just a simple read() notification a la select(), which will trigger until you've read the entire file then stop. You might find this more interesting if you point it at a named pipe then use something to stuff data down it. Take a look at the EVFILT_VNODE type in the kqueue(2) manpage. Doug White | FreeBSD: The Power to Serve dwhite@resnet.uoregon.edu | www.FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message