Path: utzoo!attcan!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.internals Subject: Re: shmat() & shmdt() questions. Message-ID: <1990Sep17.104439.8763@virtech.uucp> Date: 17 Sep 90 10:44:39 GMT References: <13612@hydra.gatech.EDU> <452@cfa.HARVARD.EDU> Reply-To: cpcahil@virtech.UUCP (Conor P. Cahill) Organization: Virtual Technologies Inc., Sterling VA Lines: 18 In article <452@cfa.HARVARD.EDU> 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. Have you tried using shmctl(.. IPC_RMID..) to do this? The feature of not deleting the item until count goes to zero is usually not documented for shared memory segments (although it is not only not-documented for messages & semaphores, it doesn't work for them). Try it, you may be pleasantly suprised. -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc., uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170