Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!noao!ncar!mephisto!prism!gt0178a From: gt0178a@prism.gatech.EDU (BURNS,JIM) Newsgroups: comp.unix.internals Subject: Re: shmat() & shmdt() questions. Message-ID: <13956@hydra.gatech.EDU> Date: 21 Sep 90 08:34:40 GMT References: <583@dptechno.UUCP> Organization: Georgia Institute of Technology Lines: 23 in article <583@dptechno.UUCP>, dave@dptechno.UUCP (Dave Lee) says: >>key_t=long). E.g. - if I want the key to be 'phs1', I use '0x70687331'. > And just how is one supposed to know what is "not-in-use" ?, unless ofcourse, > you just happen to be in controll of all the sources to all programs that > may ever run on your machine. > If everyone would use ftok(path,id) (see stdipc(3C)) as recomended in the FM, In our case, we are developing a system for the gov't, so we DO control the sources. Obviously, in a more open environment, ftok(3) would be better. I just happen to prefer something that has *some* semantic content when I read an ipcs(1) display, even if it is an ascii representation of a string, than something chosen by a computer. (In this case, 'phs1' is short for 'phase 1'.) It is also what the HP-UX Fortran compiler's directives require you to do when you create a shm seg, so it is a design decision the vendor prefers too. -- 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