in reply to Shared Memory on Win32? And Share port for HTTP::Daemon.

I think Win32::Mutex could be of help here. If you can't block all children on select(), use a mutex. So that 1 child owns the mutex, waits on the select() and the other children wait for the mutex. When the first child wakes up on the select() it releases the mutex, starts processing the data and one of the other children wakes up as well, goes to the select() and blocks there.:

use Win32::Mutex; $mut = Win32::Mutex->new(0); ... fork_the_children; ... #and then in the children use ... $mut->wait(); $nfound = select($rout=$rin, $wout=$win, $eout=$ein, undef); $mut->release(); ... #!!! you should preven the mutex from being destroyed by # any of the children. It should only be destroyed by the # main thread and only after all children finished !!! ... # just before a child thread finishes bless $mut, 'do not destroy'; }

Jenda