in reply to parallel command execution
This creates a second process of your script, both at the same place in your code. After that, test for one process, execute for file1.
And then test for the other process, execute code for file2.
Something like this:
I think both of those will run at the exact same time(as close as reasonably possible). Hope that helps. John$pid = fork(); if( $pid == 0 ){ # This is one process(happens to be child) # Execute command for file 1 } else { # This is the second process(happens to be the parent) # Execute command for file 2 }
|
---|