PHP flock() - what's under the hood?
After wrestling with PHP source for a half an hour, I gave up. :P The question is - what system call does the PHP flock() function call boil down to on a Gentoo Linux system? I'm having some issues with it (like block-for-30-seconds-in-every-one-of-20-loop-iterations kind of issues) and I would like to know why that is so. // example: $stream = fopen( FILE , 'rb') or die('???'); $md = stream_get_meta_data($stream); echo $md['wrapper_type']; flock($stream); if this prints plainfile then the call to the php function flock() is handled by php_stdiop_set_option(...) which calls flock(). Depending