6 require Config; import Config;
7 unless ($Config{'d_fork'}) {
12 $SIG{__WARN__} = sub { die @_ };
18 #require 'open2.pl'; use subs 'open2';
23 my ($n, $result, $info) = @_;
29 print "# $info\n" if $info;
33 my ($pid, $reaped_pid);
39 ok 1, $pid = open2 'READ', 'WRITE', $perl, '-e', 'print scalar <STDIN>';
40 ok 2, print WRITE "hi kid\n";
41 ok 3, <READ> eq "hi kid\n";
42 ok 4, close(WRITE), $!;
43 ok 5, close(READ), $!;
44 $reaped_pid = waitpid $pid, 0;
45 ok 6, $reaped_pid == $pid, $reaped_pid;