]> git.wh0rd.org - tt-rss.git/commitdiff
make_lockfile: only call posix_getpid() if it actually exists (hello, win32)
authorAndrew Dolgov <fox@bah.org.ru>
Tue, 9 Feb 2010 14:05:02 +0000 (17:05 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Tue, 9 Feb 2010 14:05:02 +0000 (17:05 +0300)
functions.php

index 8eb6d79a64d78fce85e8cf99486a5430cdcca0be..1563c95ee3310d08752978dc5d238cee75e75ec6 100644 (file)
                $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;