make_lockfile: only call posix_getpid() if it actually exists (hello, win32)

master
Andrew Dolgov 15 years ago
parent 82acc36dba
commit 4c59adb1de

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

Loading…
Cancel
Save