Does the "open" function in Perl automatically checks whether a file is locked and wait for it to be unlocked? if so, how long does it wait or how can I control that period of time?
I have 5 forked processes appending data to the same file. Each forked process basically opens the file and then flocks it. It then appends its data and closes the file handler to unlock the file so that the other forked processes can use it.
Everything works as expected, but I'm afraid that the open command might timeout if one of the forked processes takes too long to complete its task.