From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <12ee874bd1d1ca3246f99555054e2820@snellwilcox.com> From: plan9fans@ntlworld.nospam.com To: 9fans@cse.psu.edu Subject: Re: [9fans] Novice question - run as other MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Wed, 17 Mar 2004 18:29:43 +0000 Topicbox-Message-UUID: 34770326-eacd-11e9-9e20-41e7f4b1d025 Hi, My all-time favorite Unix story, lifted from http://cm.bell-labs.com/cm/cs/who/dmr/hist.html Although the multiple-process idea slipped in very easily indeed, there were some aftereffects that weren't anticipated. The most memorable of these became evident soon after the new system came up and apparently worked. In the midst of our jubilation, it was discovered that the chdir (change current directory) command had stopped working. There was much reading of code and anxious introspection about how the addition of fork could have broken the chdir call. Finally the truth dawned: in the old system chdir was an ordinary command; it adjusted the current directory of the (unique) process attached to the terminal. Under the new system, the chdir command correctly changed the current directory of the process created to execute it, but this process promptly terminated and had no effect whatsoever on its parent shell! It was necessary to make chdir a special command, executed internally within the shell. It turns out that several command-like functions have the same property, for example login. -Steve