Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36195 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51981 invoked from network); 18 Mar 2008 18:24:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Mar 2008 18:24:49 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 204.11.219.139 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 204.11.219.139 mail.lerdorf.com Received: from [204.11.219.139] ([204.11.219.139:48968] helo=mail.lerdorf.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 31/A8-06623-0F800E74 for ; Tue, 18 Mar 2008 13:24:48 -0500 Received: from trainburn-lm.corp.yahoo.com (trainburn-lm.corp.yahoo.com [207.126.233.11]) (authenticated bits=0) by mail.lerdorf.com (8.14.2/8.14.2/Debian-3) with ESMTP id m2IIOgBW024636; Tue, 18 Mar 2008 11:24:44 -0700 Message-ID: <47E008E9.9080509@lerdorf.com> Date: Tue, 18 Mar 2008 11:24:41 -0700 User-Agent: Thunderbird 2.0.0.4 (Macintosh/20070604) MIME-Version: 1.0 To: Stanislav Malyshev CC: internals@lists.php.net References: <47DF3CC2.6040207@lerdorf.com> <47E00673.3020200@zend.com> In-Reply-To: <47E00673.3020200@zend.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.92.1/6288/Tue Mar 18 03:43:22 2008 on colo.lerdorf.com X-Virus-Status: Clean Subject: Re: [PHP-DEV] setjmp usage From: rasmus@lerdorf.com (Rasmus Lerdorf) Stanislav Malyshev wrote: > Hi! > >> We are using setjmp(__bailout) in zend_try, but setjmp behaves >> differently on BSD and Linux. POSIX doesn't specify whether the >> signal mask should be saved or not for this call, so different >> operating systems do different things here. I think it would be more >> consistent if we used sigsetjmp(__bailout,0) to always specify that we >> don't need to store the signal mask. This avoids an expensive >> sigprocmask syscall. > > Sounds good. Can we still use longjmp or have to use siglongjmp? It's the same thing for longjmp. POSIX doesn't specify what should be done with the signal mask after a longjmp either, so to be consistent we should use siglongjmp() as well and explicitly define what we want to do with the signal mask. I'll work up a patch. -Rasmus