Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!sun-barr!cs.utexas.edu!uunet!mcvax!hp4nl!orcenl!bengsig From: bengsig@oracle.nl (Bjorn Engsig) Newsgroups: comp.unix.wizards Subject: Is to safe to do shmat without shmget? Message-ID: <331.nlhp3@oracle.nl> Date: 17 May 89 11:23:55 GMT Reply-To: bengsig@oracle.nl (Bjorn Engsig) Organization: ORACLE Europe, The Netherlands Lines: 17 Is it safe to do the following (in all known Unix'es): - Program 1 does a succesful create of a shared memory segment (shmget), attaches to it (shmat), saves the shm identifier (NOT the key) in a file, and the program stays alive. - Program 2 reads the file, uses shmat only (NO shmget) to attach to the shared memory, and stays alive. The real point is: Is it safe to attach to an existing shared memory (for which you have the permission) using shmat with a known shmid, without getting the shmid by a call to shmget? -- Bjorn Engsig, ORACLE Europe \ / "Hofstadter's Law: It always takes Path: mcvax!orcenl!bengsig X longer than you expect, even if you Domain: bengsig@oracle.nl / \ take into account Hofstadter's Law"