Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!swrinde!zaphod.mps.ohio-state.edu!samsung!xylogics!bu.edu!husc6!encore!zelig!jdarcy From: jdarcy@encore.com (Mostly Harmless) Newsgroups: comp.unix.internals Subject: Re: shmat() & shmdt() questions. Message-ID: Date: 17 Sep 90 11:29:21 GMT References: <13612@hydra.gatech.EDU> <452@cfa.HARVARD.EDU> Sender: news@Encore.COM Lines: 22 wyatt@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@encore.com Nothing was ever achieved by accepting reality