mirror of https://tt-rss.org/git/tt-rss.git
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");
|
$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");
|
if (function_exists('posix_getpid')) {
|
||||||
|
fwrite($fp, posix_getpid() . "\n");
|
||||||
|
}
|
||||||
return $fp;
|
return $fp;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue