We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5cb705b commit db0bda0Copy full SHA for db0bda0
src/StreamSelectLoop.php
@@ -32,8 +32,13 @@ public function __construct()
32
$this->pcntl = extension_loaded('pcntl');
33
$this->signals = new SignalsHandler(
34
function ($signal) {
35
- \pcntl_signal($signal, function ($signal) {
+ \pcntl_signal($signal, $f = function ($signal) use (&$f) {
36
$this->signals->call($signal);
37
+ // Ensure there are two copies of the callable around until it has been executed.
38
+ // For more information see: https://bugs.php.net/bug.php?id=62452
39
+ // Only an issue for PHP 5, this hack can be removed once PHP 5 suppose has been dropped.
40
+ $g = $f;
41
+ $f = $g;
42
});
43
},
44
0 commit comments