note 2631 deleted from flock by ronabop

From: Date: Mon, 21 Aug 2000 01:17:56 +0000
Subject: note 2631 deleted from flock by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-2806@lists.php.net to get a copy of this message
Anybody know if fclose() will remove the lock? I assume so, but there's nothing that says so. The only way is to test it, I guess. Also, will the exclusive lock prevent the same process from opening the file? Suppose I want to test the lock thusly: <BR><BR> <PRE>$fd = fopen("some.txt","r"); flock($fd,2); /* I want exclusive rights */ ... $fd2 = fopen("some.txt","r"); /* for whatever reason, maybe I'm testing the lock */ ... fclose($fd); fclose($fd2); </PRE> <BR>??

« previous php.notes (#2806) next »