Is to safe to do shmat without shmget?

Bjorn Engsig bengsig at oracle.nl
Wed May 24 20:16:10 AEST 1989


In article <331.nlhp3 at oracle.nl> I wrote:
>
>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?

Thank you for all the replies.  This is a summary of them:

- All who have tried it, say it works in their case.

- A few who have kernel source access to AT&T SysV, say it does work.

- A single one reads (rather mails) SVID loudly for my, where it says
  "... *a* shared memory identifier ...", NOT specifying that it has to come
  from a shmget call.

- A singly reply tells me not to do it without really mentioning why, just
  that it is "dangerous".

- Nobody had examples where it did not work.

Anyway, thank you again.
-- 
Bjorn Engsig, ORACLE Europe         \ /    "Hofstadter's Law:  It always takes
Path:   mcvax!orcenl!bengsig         X      longer than you expect, even if you
Domain: bengsig at oracle.nl           / \     take into account Hofstadter's Law"



More information about the Comp.unix.wizards mailing list