I have a script that is currently repeating several processes over and over and writing the results to a file. I want to speed this up by forking processess and having them all write to the same file via an open append filehandle. However, I am afraid of clobbering some output to the file with the children. Is this an issue I need to be worried about? When everything prints to stdin it appears to not clobber any of the output.
If this is an issue how can I get around it? I looked into flock, but all children inherit the parent's lock on a fctnl platform (I am using linux)