in reply to Using simultaneous threads
Now to start two of them simultaneous you could do a fork (which is clean and easy). Small caveat: You can easily check whether the child process finished, but to get a status/success/failure message, you would need a file or some IPC. But don't worry, some helpful monk will probably tell you about a module that already does most of this.system("$cmd > $dumpfile")==0 or die ...;
Just for completeness sake: There is also the possibility of letting the shell fork:
The '&' makes sure the system call returns immediately, so that you can start the second dump directly afterwards. To find out whether the child finished you could check the output of ps, but that is a dirty und unsafe hack in my view.system("$cmd > $dumpfile &")==0 or die ...;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using simultaneous threads
by waba (Monk) on May 13, 2008 at 17:17 UTC |