Bug #75859 [NEW]: signal handler error promoted from error to fatal error, undocumented
From: divinity76 at gmail dot com
Operating system: Debian 9 x64and ubuntu 16.04 x64
PHP version: 7.2.1
Package: PCNTL related
Bug Type: Bug
Bug description:signal handler error promoted from error to fatal error, undocumented
Description:
------------
somewhere between 7.0.21 and 7.2.1 , pcntl_signal failing by trying to
install a handler for SIGKILL was promoted from a catchable E_?? to a
fatal error, and it's not documented. and imo, it's not an improvement
(yes, it's an error and it should be reported, but it shouldn't be a
_fatal_ error)
and LawnGnome@freenode #php said:
<LawnGnome> (...) It appears to have been due to ZEND_SIGNALS being
flipped to on by default in PHP 7.1.0, which changed the codepath that
installs the signal handler to one that fatals on error instead of
warning. (The reason for that in general was to support asynchronous
signal handling.)
<LawnGnome> I'd suggest opening a bug at https://bugs.php.net/ â I
don't know if the fix will be to change the behaviour of the signal
handler installation or to update the docs, but obviously one or the
other needs to happen.
Test script:
---------------
<?php
@pcntl_signal ( SIGKILL, "printf" );
echo "not fatal!";
Expected result:
----------------
not fatal!
Actual result:
--------------
(blank)
--
Edit bug report at https://bugs.php.net/bug.php?id=75859&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75859&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75859&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75859&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75859&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75859&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75859&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75859&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75859&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75859&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75859&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75859&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75859&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75859&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75859&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75859&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75859&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75859&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75859&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75859&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75859&r=mysqlcfg
Thread (2 messages)
- divinity76 at gmail dot com