Page MenuHomePhabricator

D17200.id41361.diff
No OneTemporary

D17200.id41361.diff

diff --git a/scripts/__init_script__.php b/scripts/__init_script__.php
--- a/scripts/__init_script__.php
+++ b/scripts/__init_script__.php
@@ -1,6 +1,10 @@
<?php
-declare(ticks = 1);
+if (function_exists('pcntl_async_signals')) {
+ pcntl_async_signals(true);
+} else {
+ declare(ticks = 1);
+}
function __phutil_init_script__() {
// Adjust the runtime language configuration to be reasonable and inline with
diff --git a/scripts/daemon/exec/exec_daemon.php b/scripts/daemon/exec/exec_daemon.php
--- a/scripts/daemon/exec/exec_daemon.php
+++ b/scripts/daemon/exec/exec_daemon.php
@@ -1,7 +1,11 @@
#!/usr/bin/env php
<?php
-declare(ticks = 1);
+if (function_exists('pcntl_async_signals')) {
+ pcntl_async_signals(true);
+} else {
+ declare(ticks = 1);
+}
require_once dirname(__FILE__).'/../../__init_script__.php';
diff --git a/scripts/daemon/launch_daemon.php b/scripts/daemon/launch_daemon.php
--- a/scripts/daemon/launch_daemon.php
+++ b/scripts/daemon/launch_daemon.php
@@ -1,7 +1,11 @@
#!/usr/bin/env php
<?php
-declare(ticks = 1);
+if (function_exists('pcntl_async_signals')) {
+ pcntl_async_signals(true);
+} else {
+ declare(ticks = 1);
+}
$root = dirname(dirname(dirname(__FILE__)));
require_once $root.'/scripts/__init_script__.php';

File Metadata

Mime Type
text/plain
Expires
Thu, Oct 24, 12:23 PM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6722160
Default Alt Text
D17200.id41361.diff (1 KB)

Event Timeline