Update bin/daemon.php
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
parent
8827d4c142
commit
f430e06f80
|
@ -163,8 +163,7 @@ if (!$foreground) {
|
|||
exit(1);
|
||||
} elseif ($pid) {
|
||||
// The parent process continues here
|
||||
file_put_contents($pidfile, $pid);
|
||||
if (!is_readable($pidfile)) {
|
||||
if (!file_put_contents($pidfile, $pid)) {
|
||||
echo "Pid file wasn't written.\n";
|
||||
Logger::warning('Could not store pid file');
|
||||
posix_kill($pid, SIGTERM);
|
||||
|
|
Loading…
Reference in New Issue
Block a user