IO-Trace
view release on metacpan or search on metacpan
t/19-iotrace-slow-fds.t view on Meta::CPAN
alarm 5;
ok(close($out_fh), t." $prog: close stdout");
# Test #LineL: STDERR-BORK
alarm 5;
chomp($line = <$err_fh>);
ok($line, t." $prog: back5: $line");
like($line, qr{undef}, t." $prog: err finished");
# Test #LineM: p (PAUSE for a second)
# Quick probe to make sure prog is still alive
alarm 5;
my $died = waitpid(-1, WNOHANG);
ok($died<=0, t." $prog: PID[$pid] still running: $died");
# If the PAUSE is working, then STDERR should still be open, but empty
alarm 5;
$! = 0;
ok($err_fh->opened, t." $prog: STDERR is still open: $!");
ok(!canread($err_fh), t." $prog: STDERR buffer empty: $!");
( run in 1.527 second using v1.01-cache-2.11-cpan-39bf76dae61 )