why does it behave like this?
Because the locks are merely advisory? As you have not provided an example of your "corrupted/wrongly printed" data we can only guess that some other process isn't honouring the advisory lock.
In reply to Re: Question about flock and printing to file
by hippo
in thread Question about flock and printing to file
by deruytja
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |