From 37cf1c9894c356e6c11057ed206fc37e44d64953 Mon Sep 17 00:00:00 2001 From: Hartmut Holzgraefe Date: Thu, 19 Oct 2000 13:11:07 +0000 Subject: [PATCH] added a warning about using flock() in multithreaded environments (taken from a thread on the german PHP mailing list) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@34123 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/filesystem.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/functions/filesystem.xml b/functions/filesystem.xml index fa776b2ea0..b10f6af8ec 100644 --- a/functions/filesystem.xml +++ b/functions/filesystem.xml @@ -998,6 +998,15 @@ $fcontents = join ('', file ('http://www.php.net')); Flock returns true on success and false on error (e.g. when a lock could not be acquired). + + + On most operation systems flock is implemented + at the process level. When using a multithreaded server API like + ISAPI you cannot rely on flock to protect + files against other PHP scripts running in parallel threads of the + same server instance! + +