Re: PHP 4.0 Bug #7554: Exclusive flock() breaks client/servercommunication

From: Date: Tue, 31 Oct 2000 22:51:08 +0000
Subject: Re: PHP 4.0 Bug #7554: Exclusive flock() breaks client/servercommunication
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-36562@lists.php.net to get a copy of this message
Hi all, > $fp1 = fopen("/tmp/test.txt","a"); > if (!$fp1) die("cant open file 1"); > if (!flock($fp1,2)) die("cant lock file 1"); > > $fp2 = fopen("/tmp/test.txt","a"); > if (!$fp2) die("cant open file 2"); > > // causes troubles > if (!flock($fp2,2)) die("cant lock file 2"); [...] > Are you sure that it isn't blocking on the second fopen()? That's what > locking is supposed to do. this second fopen() provides a valid file handle (as expected), the second flock($fp2,LOCK_EX) on this previously exclusiv-locked file should return "false" or should die() with a message in this case - right? - it doesn't. The client-browser is trying (seems infitely) to receive data - or in other words this script doesn't terminate. I tried it with 4.0.1pl2 now - same effect. yours dtg

« previous php.dev (#36562) next »