On 04-May-2001 Stanislav Malyshev a.k.a Frodo wrote:
>>> 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.

True, but they can only be used by an already attached processes just like
open files that are unlinked (although they appear in ipcs(1), a shmget(2)
fails with 'identifier removed' error).

Actually, this was very interesting remark. Since the API's of the 3 Sys-V
IPC mechanisms is so similar I haven't noticed (until now) that shared
memory has different sematics (because it has shmdt() <==> close(), while
message queues and semaphores don't have an equivalent call).

Thanks for the enlightenment...

BTW: we both agree that for *mutual exclusion* there are better means than
     semaphores.

------------------------------------------------
Oron Peled                             Voice/Fax: +972-4-8228492
[EMAIL PROTECTED]                  http://www.actcom.co.il/~oron

The best way to accelerate a Windows box...
                   ...is at 9.8 meters per second per second.


=================================================================
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