clp@altos86.Altos.COM (Chuck L. Peterson) (05/25/89)
Am I missing something incredibly obvious, or does System V IPC lack a bit which indicates that the shared memory, semaphore, or message should be removed automatically when my process exits? This would be an ultra-cool feature if I could ever figure out how to do it. Chuck L. Peterson clp@altos.com
weber_w@apollo.com (Walt Weber) (06/12/89)
In article <1151@altos86.UUCP> clp@altos86.Altos.COM (Chuck L. Peterson) writes: > >Am I missing something incredibly obvious, or does System V >IPC lack a bit which indicates that the shared memory, semaphore, or >message should be removed automatically when my process exits? This behavior would seem to fly in the face of the understanding that the SYSV IPC's are system-wide resources, and not "exported from a process". The model which appears to be most widely used (beware: limited sample!) is that a process will be run from inittab which will create ("seed") the IPC feature with the appropriate permissions, values, and sizes, and then exit. All others will block (or exit) if the environment they find is non-existent (or incorrect). Why keep "placeholder" processes hanging around in the process table? ..walt... >clp@altos.com -- Walt Weber Apollo Computer (508) 256-6600 x8315 People's Republic of Massachusetts -The views expressed herein are personal, and not binding on Apollo-
phil@Apple.COM (Phil Ronzone) (06/12/89)
In article <1151@altos86.UUCP> clp@altos86.Altos.COM (Chuck L. Peterson) writes: > >Am I missing something incredibly obvious, or does System V >IPC lack a bit which indicates that the shared memory, semaphore, or >message should be removed automatically when my process exits? >This would be an ultra-cool feature if I could ever figure out how >to do it. Yep - it don't have dat feature! They all share some common code and data structures. Conceptually, semaphores and IPC and shared memory are generally utilized by more than one process (which may not even be running at the same time) and hence it wasn't thought particularily valuable to have a "remove me at exit time" flag. +-----------------------------------------------------------------------------+ |Philip K. Ronzone, Apple Computer, 10440 Bubb Rd, MS 58A, Cupertino, CA 95014| |{amdahl,decwrl,sun,voder,nsc,mtxinu,dual,unisoft,...}!apple!phil | +-----------------------------------------+-----------------------------------+ | All "IMHOs" disclaimed and copyrighted. | Self defense is a human right ... | +-----------------------------------------+-----------------------------------+
bcs@beach.cis.ufl.edu (Bradley C. Spatz) (06/12/89)
In article <1151@altos86.UUCP> clp@altos86.Altos.COM (Chuck L. Peterson) writes: > >Am I missing something incredibly obvious, or does System V >IPC lack a bit which indicates that the shared memory, semaphore, or >message should be removed automatically when my process exits? >This would be an ultra-cool feature if I could ever figure out how >to do it. I know there is a SEM_UNDO bit used with the semop call, and I'm pretty sure there are similar bits for message queues and shared memory, even though normal scheduling mechanisms might be sufficient for the latter. Get a hold of a comprehensive reference for Sys V... -- Bradley C. Spatz Internet: bcs@beach.cis.ufl.edu Computer and Information Sciences BITNET: spatz@uffsc.bitnet College of Engineering Univeristy of Florida "School IS hell" -- Matt Groening