Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94236 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82003 invoked from network); 23 Jun 2016 18:26:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jun 2016 18:26:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 157.56.110.111 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 157.56.110.111 mail-bn1on0111.outbound.protection.outlook.com Received: from [157.56.110.111] ([157.56.110.111:42819] helo=na01-bn1-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8C/81-08667-5C92C675 for ; Thu, 23 Jun 2016 14:26:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RWSoftware.onmicrosoft.com; s=selector1-zend-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=6m7gavRKSYWzuYXw6hqIVHxiOR8rrsRPne/Lma4gBtw=; b=eMoBqd4rc1pVk2rffqY4bVs/65y1YNZkgon6YCMOx/utLTbeNbEyFLLHGMApzLruKR+jz48nGoSIh3z2s0XrEwksZNKHlgkyVopNCdvPkwi2QtZF+y5MFHeq/YFy9NyiZqhsJO+NGIpGSzDX9VIt3dl28neCfFwMWOA/wZiJewk= Received: from BY2PR0201MB1784.namprd02.prod.outlook.com (10.163.72.26) by BY2PR0201MB1784.namprd02.prod.outlook.com (10.163.72.26) with Microsoft SMTP Server (TLS) id 15.1.523.12; Thu, 23 Jun 2016 18:26:09 +0000 Received: from BY2PR0201MB1784.namprd02.prod.outlook.com ([10.163.72.26]) by BY2PR0201MB1784.namprd02.prod.outlook.com ([10.163.72.26]) with mapi id 15.01.0523.019; Thu, 23 Jun 2016 18:26:09 +0000 To: PHP internals , "bishop@php.net" , Joe Watkins , "davey@php.net" CC: David Walker Thread-Topic: [PHP-DEV] [RFC] Additional context in pcntl_signal handler (was Re: [PHP-DEV] pcntl_signal & sa_siginfo) Thread-Index: AQHRzXOCZI4rWcggWEinsWOAulZeeJ/3VOijgAAJOWw= Date: Thu, 23 Jun 2016 18:26:08 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=dmitry@zend.com; x-originating-ip: [132.245.81.165] x-ms-office365-filtering-correlation-id: b3f20155-37b0-44be-f219-08d39b93d8dc x-microsoft-exchange-diagnostics: 1;BY2PR0201MB1784;6:5oagw4zybZwPR1qwc5N3fb1fAEQDXbo8Ujd0dV0j7pYibcmePK1YNo6bf4KbuV5Y02sQyBv2Dtwq0cp3kGuffZxPjVrtfIfOTW9WtdpcY3SzjJd+fmEioHBOxMJ9EhGb2sdKQACaFVbchYNcXT9YRhDtnibZfbyfEtwjQuMeTzPnrn7Cx76hgMdTzf2IZm2KnsckYQl/nJGU18iDCqpbaYT6ukALxxdnNbxmrp8pZkzTW/6HjVO9ANEAnmo5DULrtvfDil1JhKVG2CV7adlsr7Q5rhmXhQu3YI0EHWHtxhRP4t0ZGIbMNCOabAQslPdZ;5:TwFWfp+ffXeJRnuTREWsrt8GQQwh+nVZ+Kb4n/pT1HeNAEncASVnbgo3ZteD0wdxiHEcc2S/cpwgMDWi2nFDJ5/4QjVAZG6mL3o6Ex2CLf1Lz6IU6mWCwPb6CNwHNKxWRSLdbw2G2czZ1v3BlgUTvw==;24:etSsyY/dQnSRWXCzM4KeS2Pg34hwRSJ3Ji+nNw39ypxyURpKoMtR2XA36nZGmUCM5/USpy9GzquPoHjRwwOBfJ6MviQCRGLTGD9jZHgjVCQ=;7:gvqAKPZGqDSoK5161jRAY3BFTRXsVD7LKfjvBk1n4haaQ3gKbLe+4Z0j2BJNEnCSaLCLANiQ8Kee1ESLbrHFLNRbOQ2mTbKgXrtniRcrHh+IOP/EKXzgdtkNu34hjJfaSFojAwE+sqlFdXxzpb/MoHu2FoJvdNP5vjq/LB2eq9bUgUqNm/6yvvOvkqnlustidPhQP1/xBUCel9y7SnnCzcdkz5di7DH1HAM6kx5JPAykiXurWUDPlKmjYx5sHBkPAGAbwCcCuB2vcVne/fsIOw== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB1784; x-ld-processed: 32210298-c08b-4829-8097-6b12c025a892,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(158342451672863); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001);SRVR:BY2PR0201MB1784;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB1784; x-forefront-prvs: 098291215C x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(7916002)(199003)(24454002)(377454003)(189002)(53754006)(99286002)(76576001)(86362001)(68736007)(3660700001)(74316001)(3280700002)(19617315012)(586003)(19625215002)(10400500002)(2501003)(6116002)(2906002)(4326007)(92566002)(3846002)(102836003)(7846002)(16799955002)(9686002)(7696003)(5003600100003)(15188155005)(7736002)(16236675004)(8936002)(97736004)(66066001)(106356001)(122556002)(101416001)(106116001)(5001770100001)(8676002)(81156014)(81166006)(15395725005)(87936001)(105586002)(561944003)(54356999)(189998001)(77096005)(50986999)(33656002)(15975445007)(76176999)(5002640100001)(19580405001)(19580395003)(11100500001)(2900100001)(2950100001)(7906003);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR0201MB1784;H:BY2PR0201MB1784.namprd02.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: zend.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_BY2PR0201MB1784DDC492D3F62FDDC11AC0BF2D0BY2PR0201MB1784_" MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jun 2016 18:26:08.8486 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0201MB1784 Subject: Re: [PHP-DEV] [RFC] Additional context in pcntl_signal handler (was Re: [PHP-DEV] pcntl_signal & sa_siginfo) From: dmitry@zend.com (Dmitry Stogov) --_000_BY2PR0201MB1784DDC492D3F62FDDC11AC0BF2D0BY2PR0201MB1784_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable BTW: I'm not sure what pcntl_sigaction() could return as the "oldact" argum= ent..., 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 (wa= s 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 PO= SIX does). Joe, Davey, when we stop targeting new RFCs for 7.1? Thanks. Dmitry. ________________________________ From: bishop.bettini@gmail.com on behalf of Bish= op Bettini Sent: Thursday, June 23, 2016 8:18:58 PM To: PHP internals Cc: David Walker Subject: [PHP-DEV] [RFC] Additional context in pcntl_signal handler (was Re= : [PHP-DEV] pcntl_signal & sa_siginfo) Hi All, David and I would like to propose a second array argument be added to signal handlers registered with pcntl_signal . The array passes through kernel-provided signal context like the process ID sending the signal. https://wiki.php.net/rfc/additional-context-in-pcntl-signal-handler RFC links to an implementation. Please try it out and let us know your thoughts. This only adds an argument, so no BC break. Maybe too late, but it'd be great to get this in 7.1. Thanks! bishop On Mon, Jun 13, 2016 at 2:18 PM, David Walker wrote: > Hi All, > > Long-time lurker, first time questioner here. I'm currently working on a > project wherein I end up forking off many subprocesses, but am trying to > keep tabs on the progress of individual forks by having the children send= a > signal back up to their parent every so often. > > pcntl_socket, allows me to listen for expected user signals from processe= s, > however, the handler only allows a single argument the signalnumber. I > would like to extend the handler to accept a possible second argument. I= f > compiled on a system with __siginfo_t it would use SA_SIGINFO when settin= g > up the signal listener, and populate a second argument to the user-callba= ck > which could be an array with at leas sa_pid and sa_uid (contents of _kill= ). > > So I'd like to source the list to see if this would be something that wou= ld > be welcomed, or if there would be other ideas on how to get some more inf= o > of the signal back to the PHP-side of the pcntl_signal. > > -- > Dave > --_000_BY2PR0201MB1784DDC492D3F62FDDC11AC0BF2D0BY2PR0201MB1784_--