7 $SIG{__WARN__} = sub { die @_ };
13 #require 'open2.pl'; use subs 'open2';
16 my ($n, $result, $info) = @_;
22 print "# $info\n" if $info;
26 my ($pid, $reaped_pid);
32 ok 1, $pid = open2 'READ', 'WRITE', $^X, '-e', 'print scalar <STDIN>';
33 ok 2, print WRITE "hi kid\n";
34 ok 3, <READ> eq "hi kid\n";
35 ok 4, close(WRITE), $!;
36 ok 5, close(READ), $!;
37 $reaped_pid = waitpid $pid, 0;
38 ok 6, $reaped_pid == $pid, $reaped_pid;