diff --git a/daemon.php b/daemon.php index 3b73451..377ca66 100644 --- a/daemon.php +++ b/daemon.php @@ -51,7 +51,7 @@ class daemon $this->runDir), 500); if ($file->file_exists ($this->runDir."/$name.pid")) { - $pid = $file->file_get_contents ($this->runDir."/$name.pid"); + $pid = trim ($file->file_get_contents ($this->runDir."/$name.pid")); if (file_exists ("/proc/$pid")) throw new \Exception (sprintf ( "Can't start the daemon: already running with PID %d", $pid), 500);