From: Andrew Dolgov Date: Tue, 9 Feb 2010 14:05:02 +0000 (+0300) Subject: make_lockfile: only call posix_getpid() if it actually exists (hello, win32) X-Git-Tag: 1.4.1~15 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=4c59adb1de97ffa40ae4cb3a0c82d93e40e68612;p=tt-rss.git make_lockfile: only call posix_getpid() if it actually exists (hello, win32) --- diff --git a/functions.php b/functions.php index 8eb6d79a..1563c95e 100644 --- a/functions.php +++ b/functions.php @@ -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;