mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-20 16:08:44 +00:00
throw error on non-writable file
This commit is contained in:
parent
702320a0ce
commit
72711ab92e
1 changed files with 5 additions and 1 deletions
|
@ -27,7 +27,11 @@ class Sync{
|
||||||
if(!file_exists($pidfile)) {
|
if(!file_exists($pidfile)) {
|
||||||
$pid = getmypid();
|
$pid = getmypid();
|
||||||
$file = fopen($pidfile, 'w+');
|
$file = fopen($pidfile, 'w+');
|
||||||
|
if (!$file)
|
||||||
|
echo $pidfile.' is not writeable.';
|
||||||
|
error_log($pidfile.' is not writeable.');
|
||||||
|
throw new SystemExit();
|
||||||
|
}
|
||||||
fwrite($file, $pid);
|
fwrite($file, $pid);
|
||||||
fclose($file);
|
fclose($file);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue