Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rutgers!mephisto!prism!gt0178a From: gt0178a@prism.gatech.EDU (BURNS,JIM) Newsgroups: comp.unix.internals Subject: Re: shmat() & shmdt() questions. Message-ID: <13661@hydra.gatech.EDU> Date: 14 Sep 90 06:16:54 GMT References: <1990Sep13.121704.24384@virtech.uucp> Organization: Georgia Institute of Technology Lines: 27 in article <1990Sep13.121704.24384@virtech.uucp>, cpcahil@virtech.uucp (Conor P. Cahill) says: > This isn't dangerous. Once the shared memory segment is attached it > is *supposed* to remain with the process (and therefore can move) even > through forks. (since we are talking about a fork, we must be talking > about the same kind of process and therefore there shouldn't be any > difference between the two process (other than the return of fork) unless > that vendor has broken something). Oops! I was thinking of a previous discussion involving *un*related processes. To quote TFM: Fork causes the creation of a new process. The new process (child process) is an exact copy of the calling process (parent process). This means that the child process inherits the following attributes from the parent process: [...] all attached shared memory segments (see shmop(2)) ^^^^^^^^^^^^ [...] Hewlett-Packard Company - 1 - HP-UX Release 7.0: Sept 1989 -- BURNS,JIM Georgia Institute of Technology, Box 30178, Atlanta Georgia, 30332 uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt0178a Internet: gt0178a@prism.gatech.edu