A
addinall
I'm having a problem and wondered if anyone else
has come across something like this.
I have a customer with a legacy NT4.0 system.
A requirement came up to run several jobs in
the background and capture the output of STDOUT
and STDERR for later analysis.
Code (example only)
HELLO.BAT
echo Hello World this is STDOUT
This line will produce an error to STDERRR
echo
posix.pl
#! perl -w
use Proc::Background qw( timeout_system ) ;
print("Hello World STDOUT from Perl") ;
my @t = timeout_system( 5, "c:\\Perl\\bin\\HELLO.BAT") ;
die("STDERR from Perl") ;
POSIX.BAT
perl posix.pl >log 2>&1
This gets
log
STDERR from Perl
Hello World STDOUT from Perl
But nada, zip, from the process that has been backgrounded.
This is NT4 service pack six
Active Perl-5.8.8.817 for MSWin32-x86-multi-thread.
Any ideas? I'm a UNIX head, so windows is a little
strange for me. POSIX should let you do this.
Cheers,
Mark Addinall.
has come across something like this.
I have a customer with a legacy NT4.0 system.
A requirement came up to run several jobs in
the background and capture the output of STDOUT
and STDERR for later analysis.
Code (example only)
HELLO.BAT
echo Hello World this is STDOUT
This line will produce an error to STDERRR
echo
posix.pl
#! perl -w
use Proc::Background qw( timeout_system ) ;
print("Hello World STDOUT from Perl") ;
my @t = timeout_system( 5, "c:\\Perl\\bin\\HELLO.BAT") ;
die("STDERR from Perl") ;
POSIX.BAT
perl posix.pl >log 2>&1
This gets
log
STDERR from Perl
Hello World STDOUT from Perl
But nada, zip, from the process that has been backgrounded.
This is NT4 service pack six
Active Perl-5.8.8.817 for MSWin32-x86-multi-thread.
Any ideas? I'm a UNIX head, so windows is a little
strange for me. POSIX should let you do this.
Cheers,
Mark Addinall.