Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jun 2007 17:01:15 -0400
From:      James Bailie <jimmy@mammothcheese.ca>
To:        cole@opteqint.net,  freebsd-hackers@freebsd.org
Subject:   Re: Kqueue queries
Message-ID:  <466F099B.5070801@mammothcheese.ca>
In-Reply-To: <20070612204525.9598C13C4AD@mx1.freebsd.org>
References:  <20070612204525.9598C13C4AD@mx1.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Cole wrote:

 > If I do the above, and just keep increasing number_events and
 > just mark the kevent as EV_DISABLED or EV_DELETE then all it
 > does is return that event as soon as I call kevent() with the
 > following values:  ident : 7, filter : -1, flags : 16384

That flags value is EV_ERROR.  It indicates your attempt to
register an event on a closed descriptor.  You do not need to
disable or delete events manually if the descriptor is closed,
if that was the intent.  Closing a descriptor causes all events
registered on it to be removed automatically.  You need to get
those events for closed descriptors out of your input queue.

-- 
James Bailie <jimmy@mammothcheese.ca>
http://www.mammothcheese.ca



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?466F099B.5070801>