Locking drawbacks lockf() and flock() are cooperative locks. Nothing prevents a program from accessing the file even if it's locked. For maximum lockability, you may want to use both. Poorly coded programs can get in a deadlock situation. program a locks file A program b locks file B program a tries to lock file B program b tries to lock file A a and b now block forever...