Search Perl pages
Professions, Sciences, Humanities, Business, ...
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...
Conversions, tests, processing, manipulation,...
Integer, Floating point, Matrix, Statistics, Boolean, ...
Algorithms, Memory, Process control, Debugging, ...
Data storage, Integrity, Encryption, Compression, ...
Networks, protocols, Interprocess, Remote, Client Server, ...
Timing, Calendar and Clock, Audio, Video, Printer, Controls...
Management, Filtering, File & Directory access, Viewers, ...
Next: send SOCKET,MSG,FLAGS,TO
Calls the System
IPC function semop to perform semaphore operations such as signaling and waiting.
OPSTRING must be a packed array of semop structures. Each semop structure can be generated with
pack("sss", $semnum, $semop, $semflag). The number of semaphore operations is implied by the length of
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);
die "Semaphore trouble: $!\n" unless semop($semid, $semop);
To signal the semaphore, replace ``-1'' with ``1''.
Source: Perl builtin functions
Copyright: Larry Wall, et al.
Previous: semget KEY,NSEMS,FLAGS
(Corrections, notes, and links courtesy of RocketAware.com)
Up to: Local Process Communication
Search | About | Comments | Submit Path: RocketAware > Perl >
RocketAware.com is a service of Mib Software
Copyright 2000, Forrest J. Cavalier III. All Rights Reserved.
We welcome submissions and comments