note 93400 added to function.flock

From: Date: Tue, 08 Sep 2009 07:49:12 +0000
Subject: note 93400 added to function.flock
Groups: php.notes 
Request: Send a blank email to php-notes+get-160295@lists.php.net to get a copy of this message
flock on Solaris is slightly strange: it will fail if you try to get an exclusive lock on a file not opened for writing. That is, for reading files, you MUST use a shared lock. From the Solaris man page for flock: "Read permission is required on a file to obtain a shared lock, and write permission is required to obtain an exclusive lock." In contrast, this is from the Linux man page for flock: "The mode used to open the file doesn’t matter to flock." So, beware... ---- Server IP: 217.160.72.57 Probable Submitter: 217.234.207.54 ---- Manual Page -- http://www.php.net/manual/en/function.flock.php Edit -- https://master.php.net/note/edit/93400 Del: integrated -- https://master.php.net/note/delete/93400/integrated Del: useless -- https://master.php.net/note/delete/93400/useless Del: bad code -- https://master.php.net/note/delete/93400/bad+code Del: spam -- https://master.php.net/note/delete/93400/spam Del: non-english -- https://master.php.net/note/delete/93400/non-english Del: in docs -- https://master.php.net/note/delete/93400/in+docs Del: other reasons-- https://master.php.net/note/delete/93400 Reject -- https://master.php.net/note/reject/93400 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#160295) next »