You are here

SignalListener.php in Zircon Profile 8.0

Same filename and directory in other branches
  1. 8 vendor/symfony/process/Tests/SignalListener.php

File

vendor/symfony/process/Tests/SignalListener.php
View source
<?php

// 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;