3 ms·
To elaborate, I really enjoyed reading Dennis Ritchie give some background on the evolution of Unix[1]: > As a historical curiosity, in the very first versions
by ifbizo 9y ago
To elaborate, I really enjoyed reading Dennis Ritchie give some background on the evolution of Unix[1]:
> As a historical curiosity, in the very first versions of Unix chdir was a normal command rather than a shell builtin.
> You see, at that point Unix had no fork system call. There were multiple processes, but they were created statically at startup rather than on-demand. Running a command in the shell would cause the command to replace the shell in the address space of the process, and the process quitting would put the shell back in there.
> This worked perfectly with cd being a normal command. Then they implemented fork() and were for a while very confused trying to debug how in the world fork() could have broken the chdir() system call :)
[1] https://www.bell-labs.com/usr/dmr/www/hist.html https://www.bell-labs.com/usr/dmr/www/hist.html
- LukeShu 9y agoTo clarify, these are very early revisions of Unix we're discussing, prior to Research Unix v1. By the time v1 happened, fork existed, and `chdir` was a shell builtin.