Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13967343
D17200.id41353.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D17200.id41353.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 17, 1:01 PM (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6722160
Default Alt Text
D17200.id41353.diff (1 KB)
Attached To
Mode
D17200: Where available, use async_signals in libphutil
Attached
Detach File
Event Timeline
Log In to Comment