note 29179 added to function.flock

From: Date: Wed, 05 Feb 2003 11:25:59 +0000
Subject: note 29179 added to function.flock
Groups: php.notes 
Request: Send a blank email to php-notes+get-43451@lists.php.net to get a copy of this message
[Quote]You should lock the file _before_ opening it, and unlock _after_ closing it. Othervise an another process might be able to access the file between the lock/unlock and the open/close operation.[/Quote] How should work that? I don't know how I should lock the file before opening because a resource handle is needed therefor. But a resource handle can only be optained by opening it. o_O? -- http://www.php.net/manual/en/function.flock.php http://master.php.net/manage/user-notes.php?action=edit+29179 http://master.php.net/manage/user-notes.php?action=delete+29179 http://master.php.net/manage/user-notes.php?action=reject+29179

« previous php.notes (#43451) next »