in reply to Re: Exec'ing and output
in thread Exec'ing and output
Also, I can't let the script just sit and wait for one script to finish before moving on to the next, as I may need to exec several scripts one after another, independently, and they could take some time to complete. So system()'ing them is out.
This leads to another problem.. Is there any way that you can distinguish which process/scripts last wrote to STDOUT or STDERR if I reopen those filehandles to a temporary filehandle or a scalar as an above monk posted?
Ideally, what I'd like to do is tell the children that are exec()'ing to call my logging function whenever their scripts print to STDOUT or STDERR. Is this even possible? I have a pretty specific logging format I need to conform to, and I'd like to be able to just call a function with the content of a print statement, and allow that function to handle formatting.
Thanks again for all of your help.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Exec'ing and output
by sauoq (Abbot) on Oct 21, 2005 at 21:21 UTC |