Volker Stolz wrote:
> Am 28. Dec 2000 um 10:33 MET schrieb Dan Langille:
> > What about a daemon signalling a waiting perl script?
> > Is it an issue if the daemon signals the perl script when it's already 
> > processing?  Could a signal be missed?
> 
> How about using a FIFO (maybe in /tmp) and let the daemon printf,echo,cat,...
> control-msgs into the FIFO and have a perl script sitting on the other end?
> Signals suck. Another advantage would be that the perl script could choose
> it´s own pace and let things queue up in the FIFO. However, a FIFO only
> has limited capacity. If I´d be using Haskell (http://www.haskell.org), I´d
> throw in a forkIO() and would get a neatly multi-threaded solution where one
> thread reads the FIFO and queues up requests while the other thread queries
> him for more work -- I don´t know about threaded perl, though.

This sort of thing is why we added poll(2) and later kqueue(2) support
for getting notifications on directory changes..  eg: you can get an event
to tell you that a new file "appeared" in your directory.

Cheers,
-Peter
--
Peter Wemm - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
"All of this is for nothing if we don't go to the stars" - JMS/B5



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to