Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94415 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66730 invoked from network); 7 Jul 2016 14:20:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jul 2016 14:20:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=dave@mudsite.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dave@mudsite.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain mudsite.com designates 209.85.223.180 as permitted sender) X-PHP-List-Original-Sender: dave@mudsite.com X-Host-Fingerprint: 209.85.223.180 mail-io0-f180.google.com Received: from [209.85.223.180] ([209.85.223.180:33913] helo=mail-io0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C0/B9-18622-5256E775 for ; Thu, 07 Jul 2016 10:20:21 -0400 Received: by mail-io0-f180.google.com with SMTP id i186so21657811iof.1 for ; Thu, 07 Jul 2016 07:20:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mudsite-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=kQ8nhs1oLGhE8L1VRt3QjS3ah1TTuS2bZ9Psdu+gOj8=; b=KHQ9WYzVyL1PyMxPjLKC8KqVn29EGLlMuZf0E+ps9oanDWydfggvecCQAPnjr8nblC BmkwiqwVk5QUKN1DkHrz3gj/7IzLJEi5Q7wvUErjJuv5T35886J8Ti0JI3MS8y8cqyb9 IDQOcYhbDpJ/Gu0aaSVuCI//S/w03iE/USl2Ze7j+vV8JYgxiTOSH6Ty6TWdUAsAcjZa w40O+XET9iCfST8mFTrb+0LN8SammceOr92nF1VW6TliFovoYYF5cgCKxh/N9bhCEixE 6bsQXLsHQyROVZFDFMfaOwHzMrRCsEc2OR0chk5V+khkmQgQYnlsnAzCgS66cT25wZ2W d3Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=kQ8nhs1oLGhE8L1VRt3QjS3ah1TTuS2bZ9Psdu+gOj8=; b=BiHA/R+jflXDF+p6hRbEfVcu6czxTUK3Ij7a+JDKfd4FByUs+rePK7F9Gb/+feed4Q GCVd4pOJwVa4zVkahTJtzPzgL6spy/5CF0VWdQ76uCcm64s2wu+h/6KBCPODfz9/Ph+n swprXlyRYkkQJAbobGZP0al4vxYuBiuW2D0tRaXDgdcG/s9WRfJDW/66ibCrvzANN5FG K/CAPT/KV2Yj4gN7fxS4UtLD+b40QBf92aTkxHC9BYTSPoAFdXHNnuudfBG8VH81QLXY rg5laj6w/e5wBFObcxZ5soNEWFk828aL+BILYq9NUQC2RwMAKTic2qj98qMJdD0iNMIe BqnQ== X-Gm-Message-State: ALyK8tK+r0FpXwePQyeYdj7zpO0LNSrTdWf0PH3fCQNEmidCikIDBK3b5seSrHiZTRbHNWvaD9QwcD2Bf7Ym5w== X-Received: by 10.107.28.13 with SMTP id c13mr2989419ioc.86.1467901218822; Thu, 07 Jul 2016 07:20:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 07 Jul 2016 14:20:09 +0000 Message-ID: To: Dmitry Stogov , PHP internals , "bishop@php.net" , Joe Watkins , "davey@php.net" Content-Type: multipart/alternative; boundary=001a1140a73ab6b67405370c627a Subject: Re: [PHP-DEV] [RFC] Additional context in pcntl_signal handler (was Re: [PHP-DEV] pcntl_signal & sa_siginfo) From: dave@mudsite.com (David Walker) --001a1140a73ab6b67405370c627a Content-Type: text/plain; charset=UTF-8 On Thu, Jun 23, 2016 at 1:49 PM David Walker wrote: > On Thu, Jun 23, 2016 at 12:26 PM Dmitry Stogov wrote: > >> BTW: I'm not sure what pcntl_sigaction() could return as the "oldact" >> argument..., so may be the original proposal is good enough. >> ------------------------------ >> *From:* Dmitry Stogov >> *Sent:* Thursday, June 23, 2016 9:02:55 PM >> *To:* PHP internals; bishop@php.net; Joe Watkins; davey@php.net >> *Cc:* David Walker >> *Subject:* Re: [PHP-DEV] [RFC] Additional context in pcntl_signal >> handler (was Re: [PHP-DEV] pcntl_signal & sa_siginfo) >> >> Hi, >> >> >> To keep maximum compatibility and eliminate unnecessary additional >> overhead, I would keep pcntl_signal() unchanged, but add pcntl_sigaction() >> with the ability to specify the need for the second argument (In the same >> way as POSIX does). >> >> >> Joe, Davey, when we stop targeting new RFCs for 7.1? >> > > > Now, this being my first attempt at contributing to internals, I'm not > well versed on a best-practices on benchmarking to provide metrics to my > assumption. (advice very welcomed) > Having run tests through callgrind there is, as expected, a small bit of overhead. The question is, how much overhead can be safely deemed negligible for ease of the language? In my basic test wherein I just define an empty function, set the handler, and trigger the signal there is just over 13m instructions executed. This change increases the instruction count by about 2000, or 0.0001%. I would assume keeping a simple pcntl_signal() with a single handler is more desirable than mitigating the slight overhead this introduces. -- Dave --001a1140a73ab6b67405370c627a--