5 unshift @INC, '../lib';
6 require Config; import Config;
8 # open2/3 supported on win32 (but not Borland due to CRT bugs)
9 && ($^O ne 'MSWin32' || $Config{'cc'} =~ /^bcc/i))
15 $SIG{__WARN__} = sub { die @_ };
21 #require 'open2.pl'; use subs 'open2';
26 my ($n, $result, $info) = @_;
32 print "# $info\n" if $info;
37 if ($^O eq 'MSWin32') {
45 my ($pid, $reaped_pid);
51 ok 1, $pid = open2 'READ', 'WRITE', $perl, '-e',
52 cmd_line('print scalar <STDIN>');
53 ok 2, print WRITE "hi kid\n";
54 ok 3, <READ> =~ /^hi kid\r?\n$/;
55 ok 4, close(WRITE), $!;
56 ok 5, close(READ), $!;
57 $reaped_pid = waitpid $pid, 0;
58 ok 6, $reaped_pid == $pid, $reaped_pid;