mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 22:45:56 +00:00
make_lockfile: only call posix_getpid() if it actually exists (hello, win32)
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user