Download src/php/php-src/ext/pcntl/tests/async_signals.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 345 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcntl/tests/async_signals.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pcntl/tests/async_signals.phpt
-
curl -L -o async_signals.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcntl/tests/async_signals.phpt
345 Bytes
| --TEST-- | |
| Asynchronous signal handling through VM interrupts | |
| --EXTENSIONS-- | |
| pcntl | |
| posix | |
| --FILE-- | |
| pcntl_async_signals(1); | |
| pcntl_signal(SIGTERM, function ($signo) { echo "Signal handler called!\n"; }); | |
| echo "Start!\n"; | |
| posix_kill(posix_getpid(), SIGTERM); | |
| $i = 0; // dummy | |
| echo "Done!\n"; | |
| --EXPECT-- | |
| Start! | |
| Signal handler called! | |
| Done! | |