4 unless(grep /blib/, @INC) {
6 unshift @INC, '../lib' if -d '../lib';
13 if(-d "lib" && -f "TEST") {
15 if (! $Config{'d_fork'}) {
18 elsif ($Config{'extensions'} !~ /\bIO\b/) {
19 $reason = 'IO extension unavailable';
21 undef $reason if $^O eq 'VMS';
23 print "1..0 # Skip: $reason\n";
36 $pipe = new IO::Pipe->reader($perl, '-e', 'print "not ok 1\n"');
41 $pipe->close or print "# \$!=$!\nnot ";
44 $cmd = 'BEGIN{$SIG{ALRM} = sub {print "not ok 4\n"; exit}; alarm 10} s/not //';
45 $pipe = new IO::Pipe->writer($perl, '-pe', $cmd);
46 print $pipe "not ok 3\n" ;
47 $pipe->close or print "# \$!=$!\nnot ";
50 # Check if can fork with dynamic extensions (bug in CRT):
52 system "$^X -I../lib -MOpcode -e 'defined fork or die' > /dev/null 2>&1") {
53 print "ok $_ # skipped: broken fork\n" for 5..10;
72 $stdin = bless \*STDIN, "IO::Handle";
73 $stdin->fdopen($pipe,"r");
74 exec 'tr', 'YX', 'ko';
98 $stdout = bless \*STDOUT, "IO::Handle";
99 $stdout->fdopen($pipe,"w");
100 print STDOUT "not ok 7\n";
101 exec 'echo', 'not ok 8';
108 $pipe = new IO::Pipe;
111 $SIG{'PIPE'} = 'broken_pipe';
117 print $pipe "not ok 9\n";