Error check that flock. You don't want to go on happily thinking the file is locked if the syscall failed for some reason (out of memory? networked filesystem?). For readability, use the LOCK_EX constant from Fcntl.
In reply to Re: Flocking .l file instead of file to be updated
by Anonymous Monk
in thread Flocking .l file instead of file to be updated
by delirium
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |