Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!asuvax!ncar!gatech!prism!dsm From: dsm@prism.gatech.EDU (Daniel McGurl) Newsgroups: comp.unix.wizards Subject: Re: cd in the background? Keywords: cd background Message-ID: <27756@hydra.gatech.EDU> Date: 1 May 91 03:17:27 GMT References: Distribution: comp.unix.wizards Organization: Georgia Institute of Technology Lines: 18 In article gheim@eng.auburn.edu (Greg Heim) writes: >I posted this question to comp.unix.questions and got no response... >The other day I accidentally entered > cd /new/dir & >and my directory remained unchanged. Can anyone explain what is going on here? Here's the problem. Backgrounding creates a new shell for the process to execute in. The process executes and does the CD in the newly spawned shell. Then the shell dies and the old shells variable remain the way they were. -- Danny McGurl "How straightforward the game Office of Information Technology and when all its rules are respected." Information and Computer Science Major at: Georgia Institute of Technology ARPA: dsm@prism.gatech.edu