From 4c59adb1de97ffa40ae4cb3a0c82d93e40e68612 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 9 Feb 2010 17:05:02 +0300 Subject: [PATCH] make_lockfile: only call posix_getpid() if it actually exists (hello, win32) --- functions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.39.5