[ale] Perl + Semaphores

Fletch fletch at phydeaux.org
Fri Jul 9 08:28:02 EDT 2004


>>>>> "Chris" == Chris Fowler <cfowler at outpostsentinel.com> writes:

    Chris> Guys/Gals, Is there a perl module like POSIX::IPC that will
    Chris> allow me to work with semaphores?  I need to do some
    Chris> locking.  If not I can easily crank one out in C and XSUBS.

NAME
       IPC::Semaphore - SysV Semaphore IPC object class

SYNOPSIS
           use IPC::SysV qw(IPC_PRIVATE S_IRWXU IPC_CREAT);
           use IPC::Semaphore;

           $sem = new IPC::Semaphore(IPC_PRIVATE, 10, S_IRWXU | IPC_CREAT);


See also IPC::Shareable from CPAN if you need to share whole datastructures.

-- 
Fletch                | "If you find my answers frightening,       __`'/|
fletch at phydeaux.org   |  Vincent, you should cease askin'          \ o.O'
                      |  scary questions." -- Jules                =(___)=
                      |                                               U



More information about the Ale mailing list