$sigset->delset(1);
ok(! $sigset->ismember(1), 'POSIX::SigSet->delset' );
ok( $sigset->ismember(3), 'POSIX::SigSet->ismember' );
-
+
SKIP: {
skip("no kill() support on Mac OS", 4) if $Is_MacOS;
- print "# warning, darwin seems to loose blocked signals (failing test 10)\n" if($^O eq 'darwin');
+ my $sigint_called = 0;
+
my $mask = new POSIX::SigSet &SIGINT;
my $action = new POSIX::SigAction 'main::SigHUP', $mask, 0;
sigaction(&SIGHUP, $action);
$SIG{'INT'} = 'SigINT';
kill 'HUP', $$;
sleep 1;
+
+ printf "%s 10 - masked SIGNINT received %s\n",
+ $sigint_called ? "ok" : "not ok",
+ $^O eq 'darwin' ? "# TODO Darwin seems to loose blocked signals"
+ : '';
+
print "ok 11 - signal masks successful\n";
sub SigHUP {
}
sub SigINT {
- print "ok 10 - masked SIGINT received\n";
+ $sigint_called++;
}
# The order of the above tests is very important, so
$Is_Amiga = $^O eq 'amigaos';
$Is_Cygwin = $^O eq 'cygwin';
+$Is_Darwin = $^O eq 'darwin';
$Is_Dos = $^O eq 'dos';
$Is_MPE = $^O eq 'mpeix';
$Is_MSWin32 = $^O eq 'MSWin32';
$Is_Dosish = $Is_Dos || $Is_OS2 || $Is_MSWin32 || $Is_NetWare || $Is_Cygwin;
+$Is_UFS = $Is_Darwin && (() = `df -t ufs .`) == 2;
+
my($DEV, $INO, $MODE, $NLINK, $UID, $GID, $RDEV, $SIZE,
$ATIME, $MTIME, $CTIME, $BLKSIZE, $BLOCKS) = (0..12);
# no ctime concept $ctime is ALWAYS == $mtime
# expect netware to be the same ...
skip "No ctime concept on this OS", 2
- if $Is_MSWin32;
+ if $Is_MSWin32 ||
+ ($Is_Darwin && $Is_UFS);
+
if( !ok($mtime, 'hard link mtime') ||
!isnt($mtime, $ctime, 'hard link ctime != mtime') ) {
- print <<DIAG;
+ print STDERR <<DIAG;
# Check if you are on a tmpfs of some sort. Building in /tmp sometimes
# has this problem. Also building on the ClearCase VOBS filesystem may
# cause this failure.