Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: Reference: selectChapter 5
Function Reference
Next: Reference: semget
 

semctl

semctl id, semnum, cmd, arg

Calls the System V IPC system call semctl(2). If cmd is &IPC_STAT or &GETALL, then arg must be a variable which will hold the returned semid_ds structure or semaphore value array. The function returns like ioctl: the undefined value for error, 0 but true for zero, or the actual return value otherwise. 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: selectPerl in a NutshellNext: Reference: semget
Reference: selectBook IndexReference: semget

Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.