Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94237 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86834 invoked from network); 23 Jun 2016 19:49:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jun 2016 19:49:57 -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.214.53 as permitted sender) X-PHP-List-Original-Sender: dave@mudsite.com X-Host-Fingerprint: 209.85.214.53 mail-it0-f53.google.com Received: from [209.85.214.53] ([209.85.214.53:35476] helo=mail-it0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DB/12-08667-46D3C675 for ; Thu, 23 Jun 2016 15:49:56 -0400 Received: by mail-it0-f53.google.com with SMTP id g127so78780083ith.0 for ; Thu, 23 Jun 2016 12:49:56 -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=zzGNhVF3GdztxLSOdvY41RjhFQ3AnGxqOUJBiaggBXw=; b=rs7P562t+XLitgT/ehsdG68efZ4IUL81sJRBv422K71oJTadbmmz5OthkxkjSfAXHV HbmZXLhn8RJBEVjBLLs5vottD/cq/x4obac8Xa2yIdLSoHEXisAWbwaK+we/5kTRZ2aa k4v4mxLpaJNeih80DTR4uK6IaqfGLv3GFNEObs++SpKukYqnlY8CZPGm6q/IxyO1VW3x rLCbQf35P3l592aBkJBTpFKgSz3hUJzROTL56dxfinaDJ83Nmg/pCmEipnpYZ0ll6NTg hi9ZOsqGvM9sgp2ErhaYbl5u+iriGArLXaH5qkezO8YXeWrdWhWRnRvnEwEnSrjzPyvi h7yQ== 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=zzGNhVF3GdztxLSOdvY41RjhFQ3AnGxqOUJBiaggBXw=; b=mLKEOFV2NlcIgyPh+4n/eQGAVqKhJwP7ADhH+ENoASSXXOC8c6pQ9T5F65z/1dy6CQ 5V4Eh25M1vPMIZgH1aAKquSRsUvz/Kav2Ju58Mc+FLI8kmC4GkRl8aF+lU1rWAnFHg4u 0sorX1nErR4/OnvRfIylj6o8P3HT8Ya1EHFM7ufztDFwqUUV9WB7m+5olGbc61jmU8jX HjnvNi7ghVjGCAe7yMJeTFWKOdfeeydyGFdWLGqRUnFLPpCZ2gm0rzkKXSxrWXQTuoft vnTHfIMRq1EoaQFs3QKixXEjRylq1lAoohQVxfC8SOR1fCBC3SLmRlubi9La2ziMsTWQ gZZQ== X-Gm-Message-State: ALyK8tLxuKqjfcCwUI37bdNQdH9mRQIHJkemnDqgt21HM0/GUzx+9hEM81qLmqhMjCMhjHbYz824Z0B/wYZC4g== X-Received: by 10.36.34.3 with SMTP id o3mr21878497ito.50.1466711393473; Thu, 23 Jun 2016 12:49:53 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 23 Jun 2016 19:49:43 +0000 Message-ID: To: Dmitry Stogov , PHP internals , "bishop@php.net" , Joe Watkins , "davey@php.net" Content-Type: multipart/alternative; boundary=001a114452ba990f6e0535f75b9b 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) --001a114452ba990f6e0535f75b9b Content-Type: text/plain; charset=UTF-8 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? > Dmitry, I was thinking about making a separate pcntl_* method to handle the differences, but decided against doing it as i assumed that the overhead involved in a siginfo_t allocation would be marginal. Having a separate call, if everyone would prefer, wouldn't be hard to implement. 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) On your second point, it's interesting you discuss the *oact. As it is today, calls to pcntl_signal() define the C level signal_handler as pcntl_signal_handler. So the *oact is always going to be the same handler, since userland can't control the C level handler. However, a similar idea was brought up in 72409 to have the userland callable returned. I took a stab at that bug with this pullreq so that the callable a user sets to a signal would be returned. I wasn't sure if it was PR-able, since it changes a return value of a method, and would have some BC-problems. -- Dave --001a114452ba990f6e0535f75b9b--