Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56154 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 32399 invoked from network); 8 Nov 2011 09:39:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Nov 2011 09:39:54 -0000 Authentication-Results: pb1.pair.com smtp.mail=ml@anderiasch.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ml@anderiasch.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain anderiasch.de from 81.169.138.148 cause and error) X-PHP-List-Original-Sender: ml@anderiasch.de X-Host-Fingerprint: 81.169.138.148 ares.art-core.org Received: from [81.169.138.148] ([81.169.138.148:34178] helo=mail.anderiasch.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 88/92-20122-6E8F8BE4 for ; Tue, 08 Nov 2011 04:39:51 -0500 Message-ID: <4EB8F8E2.3010208@anderiasch.de> Date: Tue, 08 Nov 2011 10:39:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Stas Malyshev CC: PHP Internals References: <4EB8BCC2.6040900@sugarcrm.com> In-Reply-To: <4EB8BCC2.6040900@sugarcrm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PHP CLI + Valgrind = FAIL From: ml@anderiasch.de (Florian Anderiasch) 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