On Aug 31, 2004, at 9:45 AM, Mike Vannorsdel wrote: --Jim _______________________________________________ darwin-development mailing list | darwin-development@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development Do not post admin requests to the list. They will be ignored. I've been trying to use kqueue with the EVFILT_PROC filter but have ran into some problems. One is that once an event fires it will never fire again until re-added to the queue. For instance: Another problem seems to be once any event in the queue fires, the others will never fire. So basically I have to re-add all events after each event I get. This seems to defeat the purpose of having a queue. Is this just how the EVFILT_PROC works, a bug, or programmer error? The term k-"queue" is somewhat of a misnomer (at least in the way that you have interpreted it). Each event source (represented by an individual kevent structure) is treated as a level-triggered event source. Instances of events from a single source are never queued. The "queue" part of the name refers to the ordering of event notifications between the various different sources registered with a given kqueue. For EVFILT_PROC events, we automatically set EV_CLEAR when you register for them. That means that all (watched) events that happen prior to you being notified will be returned at once and atomically cleared so that only future events will be returned. Are you expecting discreet notifications for a series of process events that happened in the past? Or is your test scenario assured that the subsequent events are actually occurring after the first notification is received? If the latter, then there might be a bug. But then I'm not sure why re-registering would fix it - knowing what I do about the implementation (re-registration just alters the existing registration).