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