>> What do you mean with psocket() ? Oops! - I meant pselect(). To allow one thread to wait for anything: sockets, signals and timeout. It is likely to be more robust than signal handlers a la pcntl_signal, because those can interrupt PHP execution at any time, and that is asking for trouble. I see that pcntl is incompatible with Zend optimizer, and I would not be surprised if it might be unreliable in many other circumstances as well. If signals are acted upon only at a point where they are expected, this has got to be good for reliability. pselect would be much easier to make compatible with Zend optimizer, other optimizers, Apache mod_php etc. On operating systems where pselect does not exist, PHP socket_pselect could fake it fairly cleanly with a signal handler that catches signals and sets flags, but does not divert the flow of PHP execution. The signals would not be acted upon until the next socket_pselect function is called. The two schemes could even be mixed: pcntl_signal for some signals (such as immediate semi-clean daemon shutdown) and socket_pselect for others. ...Tom
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php