Do these apps report back on STDERR/STDOUT? Otherwise, you could use open2/open3 to launch the programs.
If not, you main problem is: what ways do these apps provide to get status info from? That is something we can't see from here. Once you know that, it's probably not too hard to have Perl cooperate with them.
| [reply] |
Please forgive me if some of the solutions I propose won't apply well in a Win32 environment, I'm used to Linux. But I think that some clarifications are needed in your specs.
It must launch the individual applications in predefined order.
Do these application have to run contemporarily? I mean, you can desire to start them at 1-second of distance between them, but let them run at the same time after you've started them. This changes the situation dramatically, because if they have to executed in series (start of #1, end of #1, start of #2, end of #2, ...) you can use system(), otherwise you've to look for other solutions, ranging from IPC::Open3 to the most flexible fork() call.
It must capture the status information from individual applications as they are running (on the fly).
Note that status information is technically available only when your sub-process exits. If you're looking for ways to grab the output (e.g. standard output or standard error) from your code, you still can use both system() and the other more flexible (but less straightforward) solutions above. Take a look at Capturing both STDOUT, STDERR and exit status for this. In the first approach you'll receive the output when your subprocess exits, in the other solutions you can grab them really on-the-fly, i.e. as soon as they're written by the subprocess (beware STDOUT buffering at this regard).
Flavio (perl -e 'print(scalar(reverse("\nti.xittelop\@oivalf")))')
Don't fool yourself.
| [reply] [d/l] [select] |
You might consider rewriting your apps to take advantage of messaging. This is probably a large change in design from what you started with, however if you want to intercommunicate between applications, it's a good way to go.
This discussion may be related: Perl Friendly Message Queueing Tools
Unemployed! And on dialup to boot. :(
| [reply] |
Just a comment on IPC::Open3 or(2). It is reported that IPC::Run will do the same thing, but works better on Windows.
I'm not really a human, but I play one on earth.
flash japh
| [reply] |