2013-07-23 21:09:45 +02:00
|
|
|
#!/usr/bin/env php
|
|
|
|
<?php
|
|
|
|
|
|
|
|
// NOTE: This is substantially the same as the libphutil/ "launch_daemon.php"
|
|
|
|
// script, except it loads the Phabricator environment and adds some Phabricator
|
|
|
|
// specific flags.
|
|
|
|
|
2017-01-13 00:50:04 +01:00
|
|
|
if (function_exists('pcntl_async_signals')) {
|
|
|
|
pcntl_async_signals(true);
|
|
|
|
} else {
|
|
|
|
declare(ticks = 1);
|
|
|
|
}
|
2016-06-06 15:34:24 +02:00
|
|
|
|
2013-07-23 21:09:45 +02:00
|
|
|
$root = dirname(dirname(dirname(__FILE__)));
|
|
|
|
require_once $root.'/scripts/__init_script__.php';
|
|
|
|
|
2015-02-22 17:43:19 +01:00
|
|
|
$overseer = new PhutilDaemonOverseer($argv);
|
2013-07-23 21:09:45 +02:00
|
|
|
|
|
|
|
$bootloader = PhutilBootloader::getInstance();
|
|
|
|
foreach ($bootloader->getAllLibraries() as $library) {
|
2015-02-22 17:43:19 +01:00
|
|
|
$overseer->addLibrary(phutil_get_library_root($library));
|
2013-07-23 21:09:45 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
$overseer->run();
|