[ale] perl new IPC::Semaphore and/or C semget()

Geoffrey esoteric at 3times25.net
Wed Jun 23 12:38:15 EDT 2004


I've done quite a bit of work with SysV ipcs, and some with perl.  I 
can't recall, or locate the answer to a question that's bugging me.

When using new IPC::Semaphore() semget() or semget(2), is the process of 
getting the semaphore atomic?  Assuming usage as in:

my $sem = new IPC::Semaphore($semkey, 1, IPC_EXCL | IPC_CREAT | 0666);

or similar use of semget(2) in C?

The point is, does anyone see the flaw in using exclusive creation of a 
semaphore as the semaphore?

-- 
Until later, Geoffrey                     Registered Linux User #108567
Building secure systems in spite of Microsoft



More information about the Ale mailing list