Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!bu.edu!nntp-read!jc From: jc@raven.bu.edu (James Cameron) Newsgroups: comp.unix.questions Subject: Re: Changing directories in the background Message-ID: Date: 1 May 91 03:36:00 GMT References: Sender: news@bu.edu.bu.edu Distribution: comp.unix.questions Organization: What do you mean 'That *can't* be done????' Lines: 60 In-reply-to: gheim@eng.auburn.edu's message of 30 Apr 91 05:52:42 GMT >>>>> On 30 Apr 91 05:52:42 GMT, gheim@eng.auburn.edu (Greg Heim) said: Greg> Nntp-Posting-Host: lab14.eng.auburn.edu Greg> Howdy, Greg> I just tried the following: Greg> cd /new/dir & Greg> by accident and my directory didn't change. Can anybody tell me what happens Greg> internally here? Greg> Thanks in advance, Greg> Greg Well, to put it simply the & creates a child of the original, inherenting the parents stuff, but not causing anything to happen to the parent. Graphically, looks something like this: ____________________________________________________________________ | | | Parent - (shell in this case) certain commands work on this | | while others cause it to bear children (another | | call for sex safe!) | ___________________________________________________________________ | | | | | | | | | | | | ---------------- --------------- -------------------- | shell scripts| | background | | Those programs | ---------------- | jobs | | which do exec | /\ --------------- | calls | \\ /\ -------------------- \\ || /| \\ || // \\ || // \\ || // \\ || // \\ || // Children Now, I am sure that others with have something to say about this, but that is what I know....*8-) jc -- -- James Cameron (jc@raven.bu.edu) Signal Processing and Interpretation Lab. Boston, Mass (617) 353-2879 ------------------------------------------------------------------------------ "But to risk we must, for the greatest hazard in life is to risk nothing. For the man or woman who risks nothing, has nothing, does nothing, is nothing." (Quote from the eulogy for the late Christa McAuliffe.)