]> git.wh0rd.org Git - tt-rss.git/commitdiff
make_lockfile: save current PID
authorAndrew Dolgov <fox@bah.org.ru>
Fri, 5 Feb 2010 12:01:36 +0000 (15:01 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Fri, 5 Feb 2010 12:01:36 +0000 (15:01 +0300)
functions.php

index abd1f20d5baad813e29a86a9cffda9c5a8196a10..8eb6d79a64d78fce85e8cf99486a5430cdcca0be 100644 (file)
        function make_lockfile($filename) {
                $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");
                        return $fp;
                } else {
                        return false;