Path: utzoo!attcan!uunet!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!mips!daver!lynx!m5 From: m5@lynx.uucp (Mike McNally) Newsgroups: comp.unix.wizards Subject: Message queues (System V) Keywords: delete private queues Message-ID: <7114@lynx.UUCP> Date: 2 Mar 90 16:03:20 GMT Distribution: na Organization: Lynx Real-Time Systems, Inc., Campbell CA Lines: 23 I have recently discovered that message queues with a key of IPC_PRIVATE are not implicitly removed when all using tasks exit. In other words, if my program does: my_private_q = msgget(IPC_PRIVATE, IPC_CREAT | 0666); and then has fun sending messages to itself and its offspring until dying a timely death, the queue will remain in the system. Of course, because the IPC_PRIVATE key was used, by definition no other process will ever be able to "open" the queue in the future. I realize that it would be "nice" to do a msgctl() to get rid of the thing, but it seems a little user-hostile for the kernel to not do this automatically. Is any purpose served by keeping the queue around? (I found this out, BTW, on our Interactive Systems 386 system.) -- Mike McNally Lynx Real-Time Systems uucp: {voder,athsys}!lynx!m5 phone: 408 370 2233 Where equal mind and contest equal, go.