summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgs@consttype.org>2010-01-10 23:27:41 +0100
committerRafael Garcia-Suarez <rgs@consttype.org>2010-01-10 23:27:41 +0100
commit3365b4123660b600293d3f9bd5054523f194b5b9 (patch)
treeb98a2ffcaf52994654f0152db82e84c16789c861 /pod
parenta894cef19d191653555ef2267ebed59788db51bf (diff)
downloadperl-3365b4123660b600293d3f9bd5054523f194b5b9.tar.gz
[perl #71924] shmget/semget may return zero as valid id
Documentation in perlipc thus fixed by using // instead of ||
Diffstat (limited to 'pod')
-rw-r--r--pod/perlipc.pod4
1 files changed, 2 insertions, 2 deletions
diff --git a/pod/perlipc.pod b/pod/perlipc.pod
index 962d10625d..25b310bb7b 100644
--- a/pod/perlipc.pod
+++ b/pod/perlipc.pod
@@ -1661,7 +1661,7 @@ Here's a small example showing shared memory usage.
use IPC::SysV qw(IPC_PRIVATE IPC_RMID S_IRUSR S_IWUSR);
$size = 2000;
- $id = shmget(IPC_PRIVATE, $size, S_IRUSR|S_IWUSR) || die "$!";
+ $id = shmget(IPC_PRIVATE, $size, S_IRUSR|S_IWUSR) // die "$!";
print "shm key $id\n";
$message = "Message #1";
@@ -1683,7 +1683,7 @@ Here's an example of a semaphore:
use IPC::SysV qw(IPC_CREAT);
$IPC_KEY = 1234;
- $id = semget($IPC_KEY, 10, 0666 | IPC_CREAT ) || die "$!";
+ $id = semget($IPC_KEY, 10, 0666 | IPC_CREAT ) // die "$!";
print "shm key $id\n";
Put this code in a separate file to be run in more than one process.