#!./perl
BEGIN {
chdir 't' if -d 't';
}
# print "Pe" to a file from a parent process and "rl" to the same file
# from a child process. If buffers are flushed appropriately, the
# file should contain "Perl". We'll see...
use Config;
use warnings;
use strict;
# This attempts to mirror the #ifdef forest found in perl.h so that we
# know when to run these tests. If that forest ever changes, change
# it here too or expect test gratuitous test failures.
if ($useperlio || $fflushNULL || $d_sfio) {
print "1..7\n";
} else {
print "1..7\n";
} else {
print "1..0 # Skip: fflush(NULL) or equivalent not available\n";
exit;
}
}
my @delete;
END {
}
}
sub file_eq {
my $f = shift;
my $val = shift;
}
# This script will be used as the command to execute from
# child processes
my $f = shift;
my $str = shift;
;
$| = 0; # we want buffered output
print "ok 1 # skipped: no fork\n";
} else {
my $f = "ff-fork-$$";
# Parent
wait;
# Kid
exit;
} else {
# Bang
}
}
my %subs = (
"system" => sub {
my $c = shift;
system $c;
},
"qx" => sub {
my $c = shift;
qx{$c};
},
"popen" => sub {
my $c = shift;
},
);
my $t = 2;
my $f = "ff-$_-$$";
++$t;
}
my $cmd = _create_runperl(
prog =>
print;
}
$t += 3;