Download src/php/php-src/ext/pcntl/tests/bug73783.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 383 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcntl/tests/bug73783.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pcntl/tests/bug73783.phpt
-
curl -L -o bug73783.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcntl/tests/bug73783.phpt
383 Bytes
| --TEST-- | |
| Bug #73783: (SIG_IGN needs to be set to prevent syscals from returning early) | |
| --EXTENSIONS-- | |
| pcntl | |
| posix | |
| --FILE-- | |
| pcntl_signal(SIGCHLD, SIG_IGN); | |
| switch(pcntl_fork()) { | |
| case 0: | |
| exit; | |
| break; | |
| } | |
| $before = microtime(true); | |
| sleep(1); | |
| if (microtime(true) - $before >= 0.8) { | |
| echo "working\n"; | |
| } else { | |
| echo "failed\n"; | |
| } | |
| --EXPECT-- | |
| working | |