Please i have a conceptual question. I have two processes that outputs a file with the same name in the same directory and then execute/read that file in a perl script. These two processes can be run concurrently and i am afraid there is a chance the file can be over written by the other process hence one of the process executing an incorrect source file. essentially the line is like this : (the two lines are common to both processes)
$cmd = `my_script.pl`; ## This generates runx file
$cmd = `source runx | grep - i "Error";`
NOTE: I don't have control over the name of the file and i must run both processes in the same
Can i use an exclusive file lock right after the first command to prevent collusion?