diff options
author | Andrew Dolgov <[email protected]> | 2010-02-05 15:01:36 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2010-02-05 15:01:36 +0300 |
commit | 82acc36dbac35f6db5bd764929be43456d71b136 (patch) | |
tree | 2bdc054a1d14c2f880f7dbcf21621f28d39bee54 /functions.php | |
parent | 44cfa02554c9f928ecd505f5ff05daae550daea9 (diff) |
make_lockfile: save current PID
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/functions.php b/functions.php index abd1f20d5..8eb6d79a6 100644 --- a/functions.php +++ b/functions.php @@ -2235,7 +2235,8 @@ 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; |