On 2007-01-24 19:05:01 +0200 Philippe Roussel <[EMAIL PROTECTED]> wrote:

Hi all

You will find attached a implementation of fswatcher using the FAM
API. It should link either with FAM (1) or gamin (2), which are
available on different flavors of unix. The goal is to take advantage
of existing facilities and getting rid of timers. FAM and gamin use
kernel helpers to avoid polling when they can.

The code probably has some bugs and I'm not sure I followed exactly
the different notifications semantics but it's a start. I tested it
with GWorkspace and it seems to work well.

Opinions ?

The original fswatcher doesn't create a new Watcher object if there already is one for a 
path beeing added; it adds only a "listener", that is, it increments a counter. 
When, removing all listeners, the counter becomes 0, the Watcher object is removed from 
the watchers array.

Philippe

NB : fswatcher parameter '--daemon' results in the opposite, or I am
missing something ?

'--daemon' is not intended to be used from the command line; it is only an 
internal way to create a daemon using only NSTask instead of fork(); many 
GNUstep daemons does this; gdnc, gpbs, etc.

1 - http://oss.sgi.com/projects/fam/
2 - http://www.gnome.org/~veillard/gamin/




_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to