On a somewhat related note, if someone could shine some light on, if such chdir() which wasn't yet integrated into the shell function independent of fork() as in did fork() just spawn off a new child shell if one did chdir() or more generally how did processes interact when/if more than one child existed. I know PDP-7 had some archaic IPC but haven't gotten around to grokking fork.s or others to understand the actual operation. 



On Tue, 22 Oct 2019 at 7:06 PM, Noel Chiappa <jnc@mercury.lcs.mit.edu> wrote:
    > From: Sean Dwyer

    > chdir seems to be a syscall in 7 (sys4.c)

It's been a system call forever, see e.g.:

  https://minnie.tuhs.org//cgi-bin/utree.pl?file=V1/man/man2/chdir.2

(And the working dir was a property of the process, not data in the shell.)

     Noel
--

Abhinav Rajagopalan