throw error on non-writable file

hg/feature/cdb-packed
botanic 10 years ago
parent 702320a0ce
commit 72711ab92e

@ -27,7 +27,11 @@ class Sync{
if(!file_exists($pidfile)) {
$pid = getmypid();
$file = fopen($pidfile, 'w+');
if (!$file)
echo $pidfile.' is not writeable.';
error_log($pidfile.' is not writeable.');
throw new SystemExit();
}
fwrite($file, $pid);
fclose($file);

Loading…
Cancel
Save