6 require Config; import Config;
7 if ($^O ne 'VMS' and $Config{'extensions'} !~ /\bPOSIX\b/) {
13 use POSIX qw(fcntl_h signal_h limits_h _exit getcwd open read write);
19 $testfd = open("TEST", O_RDONLY, 0) and print "ok 1\n";
20 read($testfd, $buffer, 9) if $testfd > 2;
21 print $buffer eq "#!./perl\n" ? "ok 2\n" : "not ok 2\n";
23 write(1,"ok 3\nnot ok 3\n", 5);
26 print $fds[0] > $testfd ? "ok 4\n" : "not ok 4\n";
27 CORE::open($reader = \*READER, "<&=".$fds[0]);
28 CORE::open($writer = \*WRITER, ">&=".$fds[1]);
29 print $writer "ok 5\n";
34 $sigset = new POSIX::SigSet 1,3;
36 if (!ismember $sigset 1) { print "ok 6\n" }
37 if (ismember $sigset 3) { print "ok 7\n" }
38 $mask = new POSIX::SigSet &SIGINT;
39 $action = new POSIX::SigAction 'main::SigHUP', $mask, 0;
40 sigaction(&SIGHUP, $action);
41 $SIG{'INT'} = 'SigINT';
57 print &_POSIX_OPEN_MAX > $fds[1] ? "ok 12\n" : "not ok 12\n";
59 print getcwd() =~ m#/t$# ? "ok 13\n" : "not ok 13\n";
61 # Pick up whether we're really able to dynamically load everything.
62 print &POSIX::acos(1.0) == 0.0 ? "ok 14\n" : "not ok 14\n";