On 11/08/2011 06:23 AM, Stas Malyshev wrote:
> Indeed, valgrind says:
> ==47112== Warning: ignored attempt to set SIGUSR2 handler in sigaction();
> ==47112==          the SIGUSR2 signal is used internally by Valgrind
> 
> So it looks like it won't allow PHP to override signal handlers. The
> questions here are - does anybody sees same problem (on Mac or other
> systems) and should PHP really fail in this scenario? Not having the
> possibility to run PHP under valgrind kind of sucks.

Hi,
just poked around a bit on this.
In the valgrind 3.7 source, in tests/sigkill.c you can see that they
skip signal 32 and 33 on Linux, and SIGUSR2 seems to be different on
Darwin than on Linux.

We use SIGUSR2 in these parts of the 5.4 source:

% find . -name "*.[ch]" | xargs grep USR2

./Zend/zend_signal.c:
        static int zend_sigs[] = { TIMEOUT_SIG, SIGHUP, SIGINT, SIGQUIT,
SIGTERM, SIGUSR1, SIGUSR2 };
./ext/pcntl/pcntl.c:
        REGISTER_LONG_CONSTANT("SIGUSR2",  (long) SIGUSR2, CONST_CS |
CONST_PERSISTENT);
./sapi/fpm/fpm/fpm_signals.c:
        #ifdef SIGUSR2
[...]
./sapi/fpm/fpm/fpm_events.c:
        case '2' :                  /* SIGUSR2 */
[...]

So it looks like only FPM uses it for more than the default behaviour of
"terminate", from a quick glance.

Greetings,
Florian

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

Reply via email to