IPC::SysV#

📦 std

System V IPC constants and the system calls Perl’s builtins do not cover.

Perl’s core already provides msgget/msgctl/msgsnd/msgrcv, semget/semctl/semop and shmget/shmctl/shmread/shmwrite as builtins (pp_sys.c). What the IPC::SysV XS adds on top is the constant table (IPC_CREAT, SEM_UNDO, SHM_RDONLY, …), the ftok key generator, shared-memory attach/detach, and the pack/unpack pair each of IPC::Msg::stat, IPC::Semaphore::stat and IPC::SharedMem::stat uses to move a struct msqid_ds / semid_ds / shmid_ds across the Perl boundary.

This is the XS half only. IPC/SysV.pm still loads from disk (xs_only: true) and supplies @EXPORT_OK, %EXPORT_TAGS and the AUTOLOAD that turns a constant name into a call to _constant. IPC::Msg, IPC::Semaphore and IPC::SharedMem are pure Perl on top of it and need no native half at all.

Functions#

Other Functions#

ftok#

ftok(path, id = undef) - SysV.xs line 307.

memread#

memread(addr, sv, pos, size) - SysV.xs line 345.

memwrite#

memwrite(addr, sv, pos, size) - SysV.xs line 370.

shmat#

shmat(id, addr, flag) - SysV.xs line 388. Returns the attach address as a PV holding the raw pointer bytes, matching sv2addr’s expectation.

shmdt#

shmdt(addr) - SysV.xs line 409.

constant#

_constant($name) - const-xs.inc.