diff options
| author | Andrew Dolgov <fox@bah.org.ru> | 2010-02-09 17:05:02 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@bah.org.ru> | 2010-02-09 17:05:02 +0300 |
| commit | 4c59adb1de97ffa40ae4cb3a0c82d93e40e68612 (patch) | |
| tree | cc76d063d4de6ff674a708c6495313db9778040b | |
| parent | 82acc36dbac35f6db5bd764929be43456d71b136 (diff) | |
make_lockfile: only call posix_getpid() if it actually exists (hello, win32)
| -rw-r--r-- | functions.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/functions.php b/functions.php index 8eb6d79a6..1563c95ee 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; |