Download src/php/php-src/ext/pcntl/tests/bug81577.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 608 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcntl/tests/bug81577.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pcntl/tests/bug81577.phpt
-
curl -L -o bug81577.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcntl/tests/bug81577.phpt
608 Bytes
| --TEST-- | |
| Bug #81577: (Exceptions in interrupt handlers) | |
| --EXTENSIONS-- | |
| pcntl | |
| posix | |
| --FILE-- | |
| class C { | |
| public static $cond = 1; | |
| public static $a; | |
| } | |
| C::$a = [ C::$cond ]; // make countable zval | |
| pcntl_async_signals(true); | |
| pcntl_signal(SIGTERM, function ($signo) { throw new Exception("Signal"); }); | |
| for ($i = 0; $i < 5; $i++) { | |
| try { | |
| C::$a + C::$a; | |
| posix_kill(posix_getpid(), SIGTERM) + C::$cond; | |
| } catch (Throwable $ex) { | |
| echo get_class($ex) , " : " , $ex->getMessage() , "\n"; | |
| } | |
| } | |
| --EXPECT-- | |
| Exception : Signal | |
| Exception : Signal | |
| Exception : Signal | |
| Exception : Signal | |
| Exception : Signal | |