From: Nick Ing-Simmons Date: Sat, 23 May 1998 08:45:04 +0000 (+0000) Subject: Ids of msgs and sems can be zero, so change || die to a defined() test X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ce5ffdc7f30bda388fc3a94fecb8e0d96662dbed;p=p5sagit%2Fp5-mst-13.2.git Ids of msgs and sems can be zero, so change || die to a defined() test p4raw-id: //depot/win32/perl@1026 --- diff --git a/t/op/ipcmsg.t b/t/op/ipcmsg.t index ab2b073..72e345c 100755 --- a/t/op/ipcmsg.t +++ b/t/op/ipcmsg.t @@ -110,8 +110,9 @@ use strict; print "1..6\n"; -my $msg = msgget($IPC_PRIVATE, $S_IRWXU | $S_IRWXG | $S_IRWXO) - || die "msgget failed: $!\n"; +my $msg = msgget($IPC_PRIVATE, $S_IRWXU | $S_IRWXG | $S_IRWXO); +# Very first time called after machine is booted value may be 0 +die "msgget failed: $!\n" unless defined($msg) && $msg >= 0; print "ok 1\n"; diff --git a/t/op/ipcsem.t b/t/op/ipcsem.t index f71f810..a1450ff 100755 --- a/t/op/ipcsem.t +++ b/t/op/ipcsem.t @@ -115,8 +115,9 @@ exit; print "1..10\n"; -my $sem = semget($IPC_PRIVATE, 10, $S_IRWXU | $S_IRWXG | $S_IRWXO | $IPC_CREAT) - || die "semget: $!\n"; +my $sem = semget($IPC_PRIVATE, 10, $S_IRWXU | $S_IRWXG | $S_IRWXO | $IPC_CREAT); +# Very first time called after machine is booted value may be 0 +die "semget: $!\n" unless defined($sem) && $sem >= 0; print "ok 1\n";