On 8/4/08 11:51 PM, "Arnaud Le Blanc" <[EMAIL PROTECTED]> wrote:
> global_sigmask is initialized using sigfillset(), so it contains _all_ signals
> (except SIGSEGV, etc because non-blockable or not safe to block) and there is
> no need to add signals to global_sigmask it in zend_signal() /
> zend_signal_register() :)

Right you are. Apparently I saw it was doing that but it didn't really
register.

> For extensions IMO we should just let them use zend_signal() as it currently
> is. Using pcntl_signal() will override handlers previously set by
> zend_signal() but the signal will remain deferred.

I don't see how it would continue to be deferred. We'd be relying on the
fact that pcntl depends on a tick or call to the dispatch function to
actually invoke any userspace code. Once registering a signal via pcntl I'm
able to jump out of a critical section into pctl_signal_handler when a
signal is received. This code might be safe since it doesn't do very much
but I don't get real protection.

> I updated the patches on the wiki:
> - Added zend_sigaction()
> - Ported PCNTL to use zend_sigaction()
> - Fixed handling of SIG_IGN

Great. I'll pull these down.

-lucas


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to