]> git.wh0rd.org - tt-rss.git/blobdiff - functions.php
make_lockfile: only call posix_getpid() if it actually exists (hello, win32)
[tt-rss.git] / 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;