>> This is not a PROBLEM but a FEATURE. All Sys-V IPC (semaphores,
>> message queues, shared memory) outlive their creators.

Wrong. Shared memory can be pre-deleted, so that it is removed when last
process is detached. Just like files. Semaphores can not. In fact, there's
no good way to insure that application cleans up its semaphores on exit.
If you know one, you are more than welcome to share.

>> However, semaphore aren't being used just for Mutual-Exclusion problems.
>> A classical counter example is producer-consumer that aren't running
>> continuously.

Well, in fact in most cases sempahores are used for mutual exclusion or
usage control (something like "does anyone uses this resource or can I
mess with it?"). From my experience, file locks work way better in this
case.

-- 
[EMAIL PROTECTED]      \/  There shall be counsels taken
Stanislav Malyshev      /\  Stronger than Morgul-spells
phone +972-3-9316425    /\              JRRT LotR.
http://sharat.co.il/frodo/      whois:!SM8333


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to