Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: Reference: semgetChapter 5
Function Reference
Next: Reference: send
 

semop

semop key, opstring

Calls the System V IPC system call semop(2) to perform semaphore operations such as signaling and waiting. opstring must be a packed array of semop structures. You can make each semop structure by saying pack('s*', $semnum, $semop, $semflag). The number of semaphore operations is implied by the length of opstring. The function returns true if successful, or false if there is an error. On error, it puts the error code into $!. Before calling, you should say:

require "ipc.ph";
require "sem.ph";
This function is available only on machines supporting System V IPC.


Previous: Reference: semgetPerl in a NutshellNext: Reference: send
Reference: semgetBook IndexReference: send



Banner.Novgorod.Ru