php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #78453 Document pcntl_signal's $siginfo array
Submitted: 2019-08-24 20:59 UTC Modified: -
From: requinix@php.net Assigned:
Status: Open Package: PCNTL related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2019-08-24 20:59 UTC] requinix@php.net
Description:
------------
The docs say
https://www.php.net/manual/en/function.pcntl-signal.php

> siginfo
> If operating systems supports siginfo_t structures, this will be an array of
> signal information dependent on the signal.

and in the changelog
> As of PHP 7.1.0 the handler callback is given a second argument containing the
> signinfo of the specific signal. This data is only supplied if the operating
> system has the signinfo_t structure. If the OS does not implement siginfo_t
> NULL is supplied.

(note: the page has a few "signinfo" typos)

but they don't give any more information than that.

Array keys according to PHP 7.4.0beta4:
https://github.com/php/php-src/blob/php-7.4.0beta4/ext/pcntl/pcntl.c#L1281

All signals:
* signo
* errno
* code

SIGCHLD:
* status
* utime - if available
* stime - if available
* pid
* uid

SIGUSR1, SIGUSR2:
* pid
* uid

SIGILL, SIGFPE, SIGSEGV, SIGBUS:
* addr

SIGPOLL:
* band
* fd - if available

Real-time signals (per SIGRTMIN/SIGRTMAX) - if available: (since PHP 7.2.16/7.3.3)
* pid
* uid


Patches

Pull Requests

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 21:01:28 2024 UTC