shmat() & shmdt() questions.

Mostly Harmless jdarcy at encore.com
Mon Sep 17 21:29:21 AEST 1990


wyatt at cfa.HARVARD.EDU (Bill Wyatt,OIR) writes:
>Yes. One thing that bugs me is that there's apparently no way (at
>least under Ultrix) to mark a segment for deletion when its reference
>count goes to zero. As with semaphores and message queues, the useful
>file system semantics were not implemented, making these a pain to
>control. They are very useful, though, so I continue to use them.

UMAX V, Encore's version of UNIX V.3, has exactly this feature. From the
man page:

    As a non-standard extension, if (shmflg & IPC_DESTROY) is
    "true", the shared memory region is automatically destroyed
    when the reference count of attached processes shm_nattach
    is reduced to zero.  This often avoids adding code to keep
    track of currently attached shared memory regions and
    removing them in otherwise unnecessary signal handlers on
    exit.  This is an Encore Computer Corporation extension; it
    is not in the System V Interface Definition (SVID).
--

Jeff d'Arcy, Generic Software Engineer - jdarcy at encore.com
      Nothing was ever achieved by accepting reality



More information about the Comp.unix.internals mailing list