Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!usenet.ins.cwru.edu!ncoast!allbery From: allbery@NCoast.ORG (Brandon S. Allbery KB8JRR) Newsgroups: comp.unix.internals Subject: Re: shmat() & shmdt() questions. Message-ID: <1990Sep22.163631.23688@NCoast.ORG> Date: 22 Sep 90 16:36:31 GMT References: <13782@hydra.gatech.EDU> <13783@hydra.gatech.EDU> <583@dptechno.UUCP> Reply-To: allbery@ncoast.ORG (Brandon S. Allbery KB8JRR/KT) Followup-To: comp.unix.internals Organization: North Coast Public Access *NIX, Cleveland, OH Lines: 34 As quoted from <583@dptechno.UUCP> by dave@dptechno.UUCP (Dave Lee): +--------------- | In article <13783@hydra.gatech.EDU> gt0178a@prism.gatech.EDU (BURNS,JIM) writes: | >in article <13782@hydra.gatech.EDU>, I write: | >> myshmid = shmget (some-made-up-not-in-use-int-id, 4096, IPC_CREAT|600); | > ^^^ | >I suppose that should actually be 'long', as in 'key_t'. I actually | >normally use an ascii representation of a 4-char string (assuming | >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, | (and then document the path and id used), then selecting a key would have a | lot less chance of colliding with other program uses. Unless you really | want a private key, then use IPC_PRIVATE. +--------------- If shared memory were in the standard namespace, this wouldn't be a problem. Yes, this is a change of tune for me. But I was hoping that AT&T would eventually integrate the two namespaces into a single one. From the UNIX/WORLD description, it looks like they have... research, at least. (See the article on Plan 9.) I wonder how long before the commercial side picks up on that concept? ++Brandon -- Me: Brandon S. Allbery VHF/UHF: KB8JRR on 220, 2m, 440 Internet: allbery@NCoast.ORG Packet: KB8JRR @ WA8BXN America OnLine: KB8JRR AMPR: KB8JRR.AmPR.ORG [44.70.4.88] uunet!usenet.ins.cwru.edu!ncoast!allbery Delphi: ALLBERY