Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94230 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70641 invoked from network); 23 Jun 2016 17:19:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jun 2016 17:19:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=bishop.bettini@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=bishop.bettini@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.68 as permitted sender) X-PHP-List-Original-Sender: bishop.bettini@gmail.com X-Host-Fingerprint: 209.85.218.68 mail-oi0-f68.google.com Received: from [209.85.218.68] ([209.85.218.68:36821] helo=mail-oi0-f68.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DB/A1-58020-22A1C675 for ; Thu, 23 Jun 2016 13:19:31 -0400 Received: by mail-oi0-f68.google.com with SMTP id x6so13367292oif.3 for ; Thu, 23 Jun 2016 10:19:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:from:date:message-id:subject:to:cc; bh=vE2hZ4mBHOQNdUiEWIFETg4xQqgl5WMW+dg4vzXLJig=; b=TqI2P/2WtyUmC5c3gQZr4dlFIvsLZA5d29lvGlPeWnqJBih6qLyCJpIXtzNQ58pZ+f rbj7PW4HqlE1KVxF0X0K/gLxwqPcfUl1+8vcH71p8IVpzJIahDGQLyzdh83Djjph0oz4 LhzgI70f1xl8Y4ZSYn8SnhEcA9mGdgFW+K7SXeqT817YYnGJ3OJfrcrf3F4NW5SC2rse 5V8VNkKPii7gAzc2XEkquaHYfCZasXPyUruET/qN+9FSOiRaZeKPacXX1rLiQbbkomKI JEg0axiSXQDJ+1mMDichiICqBOI2h+m3eRdTfuElaAFcq/xgUyHtf8sCQCBCmv/IAdf3 8Z+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:sender:from:date :message-id:subject:to:cc; bh=vE2hZ4mBHOQNdUiEWIFETg4xQqgl5WMW+dg4vzXLJig=; b=ChdmPnpuBKUtabDUQg+Ddiryb2Hqrb1dXUWeQYLZr0i/c62+zvpMSzh4ZRogzbdmxI lWJiQ5ComHFVRtCeEvEisPY6t1yed6iPehBoOdLYyNpU1xs8OWDZIwgTOUBYFecznlu4 +KNgSBqics1MoIv4PIH8CcO0i35r6OGMiE5Oir/1H+/QLJ2FWI18DxBViOiyH16PZtcm QLPgtq3LBYBGnW6jJb5bSdcJSoyM82zzS5Nfm0wzgBkkhCN27/ak3xzb++cR9TsLqH9s w3+8PSt/WI2OUW8Wg5bmwMoFrZFPfPulhNjR62x2hnb66PYX8uNgDvyUEbM5kSdqox97 eYvA== X-Gm-Message-State: ALyK8tJGRiuSqP6LI+H7UaKE8SHWSyDQC1oErRzWop+LkgGhgrubevPy69PuexiY5PKUqPT6HjKcsnUmpZ74qw== X-Received: by 10.157.3.105 with SMTP id 96mr7330301otv.11.1466702368018; Thu, 23 Jun 2016 10:19:28 -0700 (PDT) MIME-Version: 1.0 Reply-To: bishop@php.net Sender: bishop.bettini@gmail.com Received: by 10.157.42.164 with HTTP; Thu, 23 Jun 2016 10:18:58 -0700 (PDT) Date: Thu, 23 Jun 2016 13:18:58 -0400 X-Google-Sender-Auth: 7ukF7qsGJ55xPeI3ckuAOmo5fyw Message-ID: To: PHP internals Cc: David Walker Content-Type: multipart/alternative; boundary=94eb2c037ffca31def0535f541a9 Subject: [RFC] Additional context in pcntl_signal handler (was Re: [PHP-DEV] pcntl_signal & sa_siginfo) From: bishop@php.net (Bishop Bettini) --94eb2c037ffca31def0535f541a9 Content-Type: text/plain; charset=UTF-8 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 processes, > however, the handler only allows a single argument the signalnumber. I > would like to extend the handler to accept a possible second argument. If > compiled on a system with __siginfo_t it would use SA_SIGINFO when setting > up the signal listener, and populate a second argument to the user-callback > 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 would > be welcomed, or if there would be other ideas on how to get some more info > of the signal back to the PHP-side of the pcntl_signal. > > -- > Dave > --94eb2c037ffca31def0535f541a9--