We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b9fc273 commit 7f35610Copy full SHA for 7f35610
ext/pcntl/tests/async_signals_2.phpt
@@ -0,0 +1,29 @@
1
+--TEST--
2
+Async signals in zend_call_function
3
+--SKIPIF--
4
+<?php
5
+if (!extension_loaded("pcntl")) print "skip";
6
+if (getenv("SKIP_SLOW_TESTS")) print "skip slow test";
7
+?>
8
+--FILE--
9
10
+
11
+pcntl_async_signals(1);
12
+pcntl_signal(SIGALRM, function($signo) {
13
+ throw new Exception("Alarm!");
14
+});
15
16
+pcntl_alarm(1);
17
+try {
18
+ array_map(
19
+ 'time_nanosleep',
20
+ array_fill(0, 360, 1),
21
+ array_fill(0, 360, 0)
22
+ );
23
+} catch (Exception $e) {
24
+ echo $e->getMessage(), "\n";
25
+}
26
27
28
+--EXPECT--
29
+Alarm!
0 commit comments