X-Git-Url: https://scripts.mit.edu/gitweb/autoinstallsdev/mediawiki.git/blobdiff_plain/19e297c21b10b1b8a3acad5e73fc71dcb35db44a..6932310fd58ebef145fa01eb76edf7150284d8ea:/vendor/symfony/process/Tests/SignalListener.php diff --git a/vendor/symfony/process/Tests/SignalListener.php b/vendor/symfony/process/Tests/SignalListener.php new file mode 100644 index 00000000..9e30ce3b --- /dev/null +++ b/vendor/symfony/process/Tests/SignalListener.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +pcntl_signal(SIGUSR1, function () { echo 'SIGUSR1'; exit; }); + +echo 'Caught '; + +$n = 0; + +while ($n++ < 400) { + usleep(10000); + pcntl_signal_dispatch(); +}