From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 15 15:46:08 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB82937B401 for ; Sun, 15 Jun 2003 15:46:08 -0700 (PDT) Received: from puffin.mail.pas.earthlink.net (puffin.mail.pas.earthlink.net [207.217.120.139]) by mx1.FreeBSD.org (Postfix) with ESMTP id 496BD43F75 for ; Sun, 15 Jun 2003 15:46:08 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-2ivfl9h.dialup.mindspring.com ([165.247.213.49] helo=mindspring.com) by puffin.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19RgGB-0007BS-00; Sun, 15 Jun 2003 15:46:04 -0700 Message-ID: <3EECF6E3.4BC96474@mindspring.com> Date: Sun, 15 Jun 2003 15:44:51 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: matthew@mundomateo.com References: <1079.10.0.81.10.1055692530.squirrel@www.mundomateo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4dcbb7d3923853de9ce4ac3ecec3c6eb2a2d4e88014a4647c350badd9bab72f9c350badd9bab72f9c cc: freebsd-hackers@freebsd.org Subject: Re: kqueue alternative? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jun 2003 22:46:09 -0000 Matthew Hagerty wrote: > I'm writing a little application that needs to watch a file that another > process is writing to, think 'tail -F'. kqueue and kevent are going to do > it for me on *BSD, but I'm also trying to support *cough* linux and other > UN*X types OSes. > > >From what I can find on google, the linux community seems very opposed to > kqueue and has not yet implemented it (they say: blah blah blah, aio_*, > blah blah balh.) What alternatives do I have with OSes that don't support > kqueue? I'd really hate to poll with stat(), but do I have any other > choices? The Linux community doesn't like level triggered instead of edge triggered. Basically, the KNOTE macro need another parameter, which can be used as a rendesvous between a kevent and user space. It has the advantage of not limiting the PID's to 16 bits, as well. I posted patches for this about 6 months ago. -- Terry