in reply to Re^2: capturing output of system call inside a thread
in thread capturing output of system call inside a thread
I want outputs (both STDOUT and STDERR) and any output from system() of each of these "processes" to be captured in separate files preferably with STDOUT and STDERR outputs arranged properly.
What do you mean by:
"any output from system()"?
system doesn't produce output.
Programs run using system produce output; but you've already said you want to capture that.
So what other output ("produced by system()") are you expecting?
"with STDOUT and STDERR outputs arranged properly"?
stdout is usually buffered; whereas stderr is usually unbuffered; which means that stuff written to stderr often appears on the console before stuff that was written to stdout chronologically earlier in the execution of the program.
There is nothing that can be done from outside of the program to influence the that.
If you have access to the sources of the external programs you are running; you can ensure that both streams are unbuffered; but that has nothing to do with threading, or the perl code that is invoking those programs.
I think I can suggest something to achieve your goals; but I need you to answer those two questions first.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: capturing output of system call inside a thread
by that_guy (Novice) on Sep 03, 2015 at 19:35 UTC | |
by BrowserUk (Patriarch) on Sep 03, 2015 at 19:43 UTC | |
by 1nickt (Canon) on Sep 03, 2015 at 20:07 UTC | |
by that_guy (Novice) on Sep 03, 2015 at 20:25 UTC | |
by BrowserUk (Patriarch) on Sep 03, 2015 at 21:32 UTC | |
| |
by BrowserUk (Patriarch) on Sep 03, 2015 at 21:13 UTC | |
by 1nickt (Canon) on Sep 03, 2015 at 21:45 UTC | |
|