Expect - capture log stderr in addition to stdout from a subprocess

Posted on Fri Dec 22 02:53:11 2006 by duaneellis
capture log stderr in addition to stdout from a subprocess
I'm using "expect.pm" - it works well, and I'm using this method:
$object->log_file( \&my_log_function );
I do not see a way to capture the spawn'ed processes STDERR. As an alternative, is there a way to map the sub-processes STDERR to STDOUT (much like one would do a BASH command line) My problem is the subprocess is generating both *stdout* and *stderr* the stdout, I can log, the stderr - I cannot get to (or do not know how).
I can manage the problem *IF* stdout and stderr are the same for the subprocess. I just do not know how to do this. Any suggestions?
Direct Responses: 4341 | Write a response