From: Jarkko Hietaniemi Date: Mon, 2 Jul 2001 12:53:48 +0000 (+0000) Subject: SysV IPC semops use native shorts, not forced-to-16-bit-shorts. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f878ba33add668e2581ca6b5090b9ee60bb7a475;p=p5sagit%2Fp5-mst-13.2.git SysV IPC semops use native shorts, not forced-to-16-bit-shorts. p4raw-id: //depot/perl@11075 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 09ea976..1039cd0 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -4068,12 +4068,12 @@ documentation. Calls the System V IPC function semop to perform semaphore operations such as signalling and waiting. OPSTRING must be a packed array of semop structures. Each semop structure can be generated with -C. The number of semaphore +C. The number of semaphore operations is implied by the length of OPSTRING. Returns true if successful, or false if there is an error. As an example, the following code waits on semaphore $semnum of semaphore id $semid: - $semop = pack("sss", $semnum, -1, 0); + $semop = pack("s!3", $semnum, -1, 0); die "Semaphore trouble: $!\n" unless semop($semid, $semop); To signal the semaphore, replace C<-1> with C<1>. See also