File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 32
32
'equal ' => false ,
33
33
'identical ' => false ,
34
34
],
35
- 'native_constant_invocation ' => true ,
35
+ 'native_constant_invocation ' => [
36
+ 'include ' => [
37
+ // https://github.com/php/php-src/blob/php-8.4.0/ext/pcntl/pcntl.stub.php#L201
38
+ 'SIGALRM ' ,
39
+ ],
40
+ ],
36
41
'native_function_invocation ' => false ,
37
42
'void_return ' => false ,
38
43
'blank_line_before_statement ' => [
Original file line number Diff line number Diff line change @@ -67,9 +67,9 @@ public function __construct(int $timeout)
67
67
*/
68
68
public function timeBoxed (callable $ code )
69
69
{
70
- $ existingHandler = pcntl_signal_get_handler (SIGALRM );
70
+ $ existingHandler = pcntl_signal_get_handler (\ SIGALRM );
71
71
72
- $ signal = pcntl_signal (SIGALRM , function (): void {
72
+ $ signal = pcntl_signal (\ SIGALRM , function (): void {
73
73
throw new DeadlineException (sprintf (
74
74
'Timebox hit deadline of %d seconds ' ,
75
75
$ this ->timeout
@@ -89,7 +89,7 @@ public function timeBoxed(callable $code)
89
89
} finally {
90
90
pcntl_alarm (0 );
91
91
pcntl_signal_dispatch ();
92
- pcntl_signal (SIGALRM , $ existingHandler );
92
+ pcntl_signal (\ SIGALRM , $ existingHandler );
93
93
}
94
94
}
95
95
You can’t perform that action at this time.
0 commit comments