Merge pull request #12960 from nupplaphil/feat/sigterm_cron

Add posix_kill() SIGTERM for Friendica
This commit is contained in:
Hypolite Petovan 2023-03-30 14:55:29 -04:00 committed by GitHub
commit 209489d9e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,8 +76,8 @@ DI::config()->reload();
if (empty(DI::config()->get('system', 'pidfile'))) { if (empty(DI::config()->get('system', 'pidfile'))) {
die(<<<TXT die(<<<TXT
Please set system.pidfile in config/local.config.php. For example: Please set system.pidfile in config/local.config.php. For example:
'system' => [ 'system' => [
'pidfile' => '/path/to/daemon.pid', 'pidfile' => '/path/to/daemon.pid',
], ],
TXT TXT
@ -247,5 +247,6 @@ while (true) {
} }
function shutdown() { function shutdown() {
posix_kill(posix_getpid(), SIGTERM);
posix_kill(posix_getpid(), SIGHUP); posix_kill(posix_getpid(), SIGHUP);
} }