Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site cvl.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!umcp-cs!cvl!liang From: liang@cvl.UUCP (Eli Liang) Newsgroups: net.unix Subject: Shared Memory Message-ID: <303@cvl.UUCP> Date: Sun, 14-Apr-85 21:58:51 EST Article-I.D.: cvl.303 Posted: Sun Apr 14 21:58:51 1985 Date-Received: Sun, 21-Apr-85 03:01:42 EST Distribution: net Organization: Computer Vision Lab, U. of Maryland, College Park Lines: 50 ..... I am posting this for a friend, whose Vax hasn't come in yet... :-) > > > How do you pass a key from one process to > > > another process so that both processes have acess to the > > > same "shmid"? > > > > Message passing? > > The "proper" way to do this is to use the ftok() (stdipc(3C)) routine > with a filename that all processes involved agree upon. Yes, it is > difficult to find this routine (due to the name of the manual entry > and the contents of the NAME section, it doesn't appear anywhere > useful in the permuted index), but that's how to do it. Honest -- > I've used it! > -- > Marty Shannon I am writing a multi-processing version of lisp in which one lisp process can ask another to evaluate an s-expression for the first. In order to keep things working properly, each of these `remote evaluations' should be it's own process (what's important is that it has it's own stack area, I'm willing to do my own process scheduling, but would rather not...), but they must share a single program segment (no problem) and a single data segment (problem). The above article from mod.unix seems to be about what I'm trying to do, but I have been unable to find ANY references in our on-line documentation to ftok() or sdtipc... Are they for 4.2BSC, or Sys V, or what? We're running 4.2, but I will also need to get this running on Dec ULTRIX (a carbon copy of 4.2, or so I'm told...) in the near future. vfork() seems to do part of what I want, but I cannot allow the parent process to be blocked for the duration of the child's execution. I would appreciate any ideas on the subject, or info about the above commands (how to get the doc would be sufficient), and will post summaries of any interesting suggestions I recieve. Thanks for the help.... Eric Messick reply by mail to: {seismo, allegra, brl-bmp}!umcp-cs!cvl!liang ------------------ any opinions expressed above do not literally exist within this universe..... -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Eli Liang --- University of Maryland Computer Vision Lab, (301) 454-4526 ARPA: liang@cvl, liang@lemuria, eli@mit-mc, eli@mit-prep CSNET: liang@cvl UUCP: {seismo,allegra,brl-bmd}!umcp-cs!cvl!liang