pipe.t revision 7c478bd95313f5f23a4c958a745db2134aa03244
#!./perl
BEGIN {
chdir 't' if -d 't';
}
else {
}
}
$| = 1;
next_test();
next_test();
SKIP: {
# Technically this should be TODO. Someone try it if you happen to
# have a vmesa machine.
s/^not //;
print;
}
}
else {
}
# This has to be *outside* the fork
SKIP: {
s/^not //;
print;
}
}
else {
}
# This has to be done *outside* the fork.
}
}
wait; # Collect from $pid
sub broken_pipe {
}
sleep 1;
pass();
# VMS doesn't like spawning subprocesses that are still connected to
# STDOUT. Someone should modify these tests to work with VMS.
SKIP: {
SKIP: {
# Sfio doesn't report failure when closing a broken pipe
# that has pending output. Go figure. MachTen doesn't either,
# but won't write to broken pipes, so nothing's pending at close.
# BeOS will not write to broken pipes, either.
# Nor does POSIX-BC.
sleep 5;
# If print was allowed we had better get an error on close
}
else {
}
}
SKIP: {
# check that errno gets forced to 0 if the piped program exited
# non-zero
$! = 1;
SKIP: {
# check that status for the correct process is collected
my $zombie;
$NO_ENDING=1;
exit 37;
}
my $wait = wait;
}
}
}
# Test new semantics for missing command in piped open
# 19990114 M-J. Dominus mjd@plover.com
{ local *P;
}
# check that status is unaffected by implicit close
{
$? = 42;
# NIL implicitly closed here
}
$? = 0;
# check that child is reaped if the piped program can't be executed
{
my $child = 0;
eval {
alarm 2;
$child = wait;
alarm 0;
};
}