Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23643 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18929 invoked by uid 1010); 25 May 2006 08:24:27 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 18914 invoked from network); 25 May 2006 08:24:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 May 2006 08:24:27 -0000 X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 204.11.219.139 lerdorf.com Linux 2.5 (sometimes 2.4) (4) Received: from ([204.11.219.139:44095] helo=lerdorf.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id CB/30-17316-AB965744 for ; Thu, 25 May 2006 04:24:27 -0400 Received: from [192.168.7.98] ([82.138.32.250]) (authenticated bits=0) by lerdorf.com (8.13.6/8.13.6/Debian-1) with ESMTP id k4P8ODAM030093; Thu, 25 May 2006 01:24:19 -0700 Message-ID: <447569AD.6080004@lerdorf.com> Date: Thu, 25 May 2006 12:24:13 +0400 User-Agent: Thunderbird 3.0a1 (Macintosh/20060414) MIME-Version: 1.0 To: Sara Golemon CC: Michael B Allen , internals@lists.php.net References: <20060524155947.1522f5f0.mba2000@ioplex.com> <00c001c67f8e$21256420$5c8be5a9@ohr.berkeley.edu> In-Reply-To: <00c001c67f8e$21256420$5c8be5a9@ohr.berkeley.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Signals in Extensions From: rasmus@lerdorf.com (Rasmus Lerdorf) Sara Golemon wrote: >> I have an extension that interfaces with a >> library that sets a signal handler for some >> common signals. In particular the library >> forks processes and does socket writes >> so it needs to be able to handle SIGCHLD >> and SIGPIPE. It also registers some other >> signals for debugging purposes. Can I >> anticipate any kinds of problems from this? >> Does the Zend engine use any signals in particular? >> > It's not PHP/Zend you should be afraid of... the interpreter goes a long way > towards avoiding the use of signals because it's designed to run on > webserver and that webserver may or may not try to use signals in > one way or another. If you're using the CGI SAPI you might be safe, other > than that.... Best of luck to ya. Well, we do need SIGALRM for timeouts, but yes, beyond that we should be signal-clean. But as Sara says, PHP is usually embedded inside something else and that something else tends to use signals for all sorts of stuff. -Rasmus