diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2006-05-25 21:49:33 +0300 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2006-05-26 15:03:12 +0000 |
commit | 7b34eba2950f5b80632d564408e79695e67f8c1f (patch) | |
tree | 34ef6c370ee86fbbcd72651e87ddf9ed4c8180f1 /ext/IPC | |
parent | 6e4ef77763b5ee73f945f0e8dfaf84b3a0a7402b (diff) | |
download | perl-7b34eba2950f5b80632d564408e79695e67f8c1f.tar.gz |
SysV IPC
Message-ID: <4475D20D.9010600@gmail.com>
p4raw-id: //depot/perl@28313
Diffstat (limited to 'ext/IPC')
-rw-r--r-- | ext/IPC/SysV/Msg.pm | 8 | ||||
-rw-r--r-- | ext/IPC/SysV/Semaphore.pm | 8 | ||||
-rw-r--r-- | ext/IPC/SysV/SysV.pm | 15 |
3 files changed, 24 insertions, 7 deletions
diff --git a/ext/IPC/SysV/Msg.pm b/ext/IPC/SysV/Msg.pm index fadd38f94d..1edff3b2b7 100644 --- a/ext/IPC/SysV/Msg.pm +++ b/ext/IPC/SysV/Msg.pm @@ -112,10 +112,10 @@ IPC::Msg - SysV Msg IPC object class =head1 SYNOPSIS - use IPC::SysV qw(IPC_PRIVATE S_IRWXU); + use IPC::SysV qw(IPC_PRIVATE S_IRUSR S_IWUSR); use IPC::Msg; - $msg = new IPC::Msg(IPC_PRIVATE, S_IRWXU); + $msg = new IPC::Msg(IPC_PRIVATE, S_IRUSR | S_IWUSR); $msg->snd(pack("l! a*",$msgtype,$msg)); @@ -152,7 +152,9 @@ associated with it, and C<I<FLAGS> & IPC_CREAT> is true. =back On creation of a new message queue C<FLAGS> is used to set the -permissions. +permissions. Be careful not to set any flags that the Sys V +IPC implementation does not allow: in some systems setting +execute bits makes the operations fail. =item id diff --git a/ext/IPC/SysV/Semaphore.pm b/ext/IPC/SysV/Semaphore.pm index 94ccf91728..8717a93929 100644 --- a/ext/IPC/SysV/Semaphore.pm +++ b/ext/IPC/SysV/Semaphore.pm @@ -154,10 +154,10 @@ IPC::Semaphore - SysV Semaphore IPC object class =head1 SYNOPSIS - use IPC::SysV qw(IPC_PRIVATE S_IRWXU IPC_CREAT); + use IPC::SysV qw(IPC_PRIVATE S_IRUSR S_IWUSR IPC_CREAT); use IPC::Semaphore; - $sem = new IPC::Semaphore(IPC_PRIVATE, 10, S_IRWXU | IPC_CREAT); + $sem = new IPC::Semaphore(IPC_PRIVATE, 10, S_IRUSR | S_IWUSR | IPC_CREAT); $sem->setall( (0) x 10); @@ -198,7 +198,9 @@ associated with it, and C<I<FLAGS> & IPC_CREAT> is true. =back On creation of a new semaphore set C<FLAGS> is used to set the -permissions. +permissions. Be careful not to set any flags that the Sys V +IPC implementation does not allow: in some systems setting +execute bits makes the operations fail. =item getall diff --git a/ext/IPC/SysV/SysV.pm b/ext/IPC/SysV/SysV.pm index 7645ced9f1..937acd6c0f 100644 --- a/ext/IPC/SysV/SysV.pm +++ b/ext/IPC/SysV/SysV.pm @@ -74,7 +74,20 @@ IPC::SysV - SysV IPC constants C<IPC::SysV> defines and conditionally exports all the constants defined in your system include files which are needed by the SysV -IPC calls. +IPC calls. Common ones include + + IPC_CREATE IPC_EXCL IPC_NOWAIT IPC_PRIVATE IPC_RMID IPC_SET IPC_STAT + GETVAL SETVAL GETPID GETNCNT GETZCNT GETALL SETALL + SEM_A SEM_R SEM_UNDO + SHM_RDONLY SHM_RND SHMLBA + +and auxiliary ones + + S_IRUSR S_IWUSR S_IRWXU + S_IRGRP S_IWGRP S_IRWXG + S_IROTH S_IWOTH S_IRWXO + +but your system might have more. =over 4 |