Download src/php/php-src/ext/pcntl/tests/async_signals_2.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 474 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcntl/tests/async_signals_2.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pcntl/tests/async_signals_2.phpt
-
curl -L -o async_signals_2.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcntl/tests/async_signals_2.phpt
474 Bytes
| --TEST-- | |
| Async signals in zend_call_function | |
| --EXTENSIONS-- | |
| pcntl | |
| --SKIPIF-- | |
| if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); | |
| --FILE-- | |
| pcntl_async_signals(1); | |
| pcntl_signal(SIGALRM, function($signo) { | |
| throw new Exception("Alarm!"); | |
| }); | |
| pcntl_alarm(1); | |
| try { | |
| array_map( | |
| 'time_nanosleep', | |
| array_fill(0, 360, 1), | |
| array_fill(0, 360, 0) | |
| ); | |
| } catch (Exception $e) { | |
| echo $e->getMessage(), "\n"; | |
| } | |
| --EXPECT-- | |
| Alarm! | |