make_lockfile: only call posix_getpid() if it actually exists (hello, win32)
This commit is contained in:
parent
82acc36dba
commit
4c59adb1de
|
@ -2236,7 +2236,9 @@
|
|||
$fp = fopen(LOCK_DIRECTORY . "/$filename", "w");
|
||||
|
||||
if (flock($fp, LOCK_EX | LOCK_NB)) {
|
||||
if (function_exists('posix_getpid')) {
|
||||
fwrite($fp, posix_getpid() . "\n");
|
||||
}
|
||||
return $fp;
|
||||
} else {
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue