[Linux-disciples] More UNIX history
Stephen R Laniel
steve at laniels.org
Wed Aug 18 00:16:55 EDT 2004
Reading Dennis Ritchie's reflections on early UNIX [1], I
find this bit super-interesting; it explains why 'chdir',
'login', etc. *have* to be shell-internal commands:
"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."
[1] - http://shorl.com/hugaframaprina
--
``He even provides a fountain for two characters to stand
beside, so they can illustrate Gene Siskel's maxim that
nobody in a comedy ever comes within 10 yards of water
without falling in.''
-Roger Ebert, http://shorl.com/hyfeprutekosi
More information about the Linux-disciples
mailing list