make_lockfile: save current PID

master
Andrew Dolgov 15 years ago
parent 44cfa02554
commit 82acc36dba

@ -2235,7 +2235,8 @@
function make_lockfile($filename) { function make_lockfile($filename) {
$fp = fopen(LOCK_DIRECTORY . "/$filename", "w"); $fp = fopen(LOCK_DIRECTORY . "/$filename", "w");
if (flock($fp, LOCK_EX | LOCK_NB)) { if (flock($fp, LOCK_EX | LOCK_NB)) {
fwrite($fp, posix_getpid() . "\n");
return $fp; return $fp;
} else { } else {
return false; return false;

Loading…
Cancel
Save