From c2d15e6c3bd8a29bae89d184a999ddac15fcb807 Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Sun, 1 May 2016 22:29:51 -0400 Subject: New plugin repo is cloned to /store/pluginrepos/REPONAME for analysis --- library/symfony/process/Tests/SignalListener.php | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 library/symfony/process/Tests/SignalListener.php (limited to 'library/symfony/process/Tests/SignalListener.php') diff --git a/library/symfony/process/Tests/SignalListener.php b/library/symfony/process/Tests/SignalListener.php new file mode 100644 index 000000000..4206550f5 --- /dev/null +++ b/library/symfony/process/Tests/SignalListener.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +// required for signal handling +declare (ticks = 1); + +pcntl_signal(SIGUSR1, function () {echo 'Caught SIGUSR1'; exit;}); + +$n = 0; + +// ticks require activity to work - sleep(4); does not work +while ($n < 400) { + usleep(10000); + ++$n; +} + +return; -- cgit v1.2.3