MDL-54974 behat: Handle interupts on PHP7

As https://bugs.php.net/bug.php?id=71448 is
not going to get fixed, we need to declare tick
This commit is contained in:
Rajesh Taneja
2016-06-27 14:32:54 +08:00
parent 39087f28ae
commit 723702bf08
2 changed files with 11 additions and 0 deletions
+3
View File
@@ -101,6 +101,9 @@ if (empty($options['torun'])) {
if (extension_loaded('pcntl')) {
$disabled = explode(',', ini_get('disable_functions'));
if (!in_array('pcntl_signal', $disabled)) {
// Handle interrupts on PHP7.
declare(ticks = 1);
pcntl_signal(SIGTERM, "signal_handler");
pcntl_signal(SIGINT, "signal_handler");
}