Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove automatic file unlocking on shutdown and/or stream close
(make it win32-specific for 5_2, as discussed with Ilia)
- Loading branch information
Showing
2 changed files
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42d05a5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I consider this a regression. This should be OPTIONAL. Before that flock could be used to detect multiple running instances of file (like previous run did not complete yet) (provided that php did not crash and was not killed by kill -9)
$h55 = fopen($_SERVER['argv'][0],"r");
while(!flock($h55, LOCK_EX + LOCK_NB )) {
echo "no lock sleep(10)\n";
sleep(10);
}
or
$h55 = fopen($_SERVER['argv'][0],"r");
while(!flock($h55, LOCK_EX + LOCK_NB )) {
echo "no lock die\n";
die();
}