Quantcast
Channel: User Ja͢ck - Stack Overflow
Viewing all articles
Browse latest Browse all 42

Answer by Ja͢ck for Will flock'ed file be unlocked when the process die unexpectedly?

$
0
0

According to the manual page of flock() that PHP uses internally, a lock is released when either flock() is called with LOCK_UN or when the descriptor is closed using fclose().

Upon script termination, either PHP or the OS will close the open file descriptors, thereby releasing the locks you may have.

Because of said behaviour this commit (5.3) and this one (5.2) were made to no longer do the unlocking in PHP itself.


Viewing all articles
Browse latest Browse all 42

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>