Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94233 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76587 invoked from network); 23 Jun 2016 18:03:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jun 2016 18:03:04 -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 207.46.100.116 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 207.46.100.116 mail-by2on0116.outbound.protection.outlook.com Received: from [207.46.100.116] ([207.46.100.116:2064] helo=na01-by2-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0D/60-08667-4542C675 for ; Thu, 23 Jun 2016 14:03:02 -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=HHi16+QY7h9MpJKOLCw76LXSxe/M2r1usmhM+ZVN9Cg=; b=VXi3YUF+b2NIujY7MQNn9wl6SMmxFRTJVQKejVSwEQgcuVLRA5g4aAo/Disq4iaDDJbrT7pqyE8swT/PRaNBCf+a6MMRtYugfBDd4yhTZz+MJb+UpwrRfMMhXf7yZfixSceRmHt/WiBMZeEQH51k3ucXY+qUr2H7GJ86WedTKko= Received: from BY2PR0201MB1784.namprd02.prod.outlook.com (10.163.72.26) by BY2PR0201MB1782.namprd02.prod.outlook.com (10.163.72.24) with Microsoft SMTP Server (TLS) id 15.1.523.12; Thu, 23 Jun 2016 18:02:56 +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:02:56 +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/3VOij Date: Thu, 23 Jun 2016 18:02:55 +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: 46147256-9cf2-41d5-ed2d-08d39b909aa7 x-microsoft-exchange-diagnostics: 1;BY2PR0201MB1782;6:Uyj4+MX5V8flTd+sajJLAd6AWN885Dca0DvG0hN7Dl9XCerahlqytBDVU3ry5V5o/o+DMzmHWHU/EJMNJw12V5zMItlZiWB3waXYidRhfbJ62OKf07nEJYolYEPYlaZhTkMD0aQ//pUNFpLhT3R6S21/wE7pJl1u1pGrOtqXyGOvsHyQNDg4t+x5oBZWdrzdGggTd0SU+cd+XHgqiwPISfTGnaq64pkqsfVBgikJlOFYpmIu1x57BDh3UBO0zeuOjlVEF6z1O7fuoxZYBNez5IKdFS3Eu6uaKyS8EcsppnYwhh+sY3eTo4e5QSz8GEub;5:vAIl3VjBs7iA5uxO2YGrlwnT7/jdNIrrMsfPeiHZ//8P/w+N6eAcFgURxTbD5h5PFlUriK2HltyPIS0NuQCwhd213H/JZgtxl2DmrvKaOwLx5CGkepBawHuzIRCqR3QS9zDzVFMSEkSzTloF4wvt2w==;24:0IJRdmMFU2N9uqPJtuVojD6i9t3RQP7DLN5mruuZ9zsoa2ZqKifXX+M8ayqvPRXhY/jq7hfud3tJfU1Fh5N/SV4Z0oMnfNIuwHgtiqL062o=;7:xoQ8pSfvEp43xg03SFs0Z+qHgQ3XOqGZdbMsT16a3unMkTdRHzwYSWIocLGefTtFcffv8yPbS1bIxO7TGkL9ds8mRpgu4YwH6nbw0h47VF+BaaQqU2q4qy0svXhf5IS6K9qU+pIIjV2gAS9HSOzvo3dJVlHtXgTDMd30wtxKlqHCDZO2b+J1xI9t21hsP6I/I9BJ46Xd9yZBvoLCm9blcRFMTdoViiEoLOmhhU99lXLAhQ7YSbopZfImW1yFqyE4u+CIOgEaqwqXEeq/w6raAw== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB1782; 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)(8121501046)(5005006)(3002001)(10201501046);SRVR:BY2PR0201MB1782;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB1782; x-forefront-prvs: 098291215C x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(7916002)(377454003)(24454002)(53754006)(199003)(189002)(106116001)(87936001)(66066001)(92566002)(105586002)(106356001)(8676002)(19625215002)(101416001)(99286002)(122556002)(15975445007)(77096005)(76176999)(50986999)(54356999)(11100500001)(81156014)(7906003)(81166006)(189998001)(10400500002)(16236675004)(33656002)(15395725005)(86362001)(19617315012)(76576001)(3660700001)(97736004)(2950100001)(5001770100001)(16799955002)(2501003)(68736007)(3846002)(2900100001)(8936002)(6116002)(2906002)(102836003)(5002640100001)(4326007)(19580395003)(586003)(7696003)(7846002)(7736002)(19580405001)(9686002)(15188155005)(5003600100003)(3280700002)(74316001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR0201MB1782;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_BY2PR0201MB17843929BA08BE0DE6E0AF88BF2D0BY2PR0201MB1784_" MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jun 2016 18:02:55.7600 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0201MB1782 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_BY2PR0201MB17843929BA08BE0DE6E0AF88BF2D0BY2PR0201MB1784_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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_BY2PR0201MB17843929BA08BE0DE6E0AF88BF2D0BY2PR0201MB1784_--