6.6 The story continues ...

1627:

“newproc” (1826) will be discussed in detail in the next chapter.

In brief this initialises a second “proc” structure viz. “proc[1]”, and allocates a second “per process data area” in core. This is a copy of the “per process data area” for process #0, exact in all but one respect: the value of “u.u_procp” in the second area is “&proc[1]”.

We should note here that at line 1889, there is a call on “savu” (0725) which saves the current values of the environment and the stack pointers in “u.u_rsav” before the copy is made.

Also from line 1918 we can see that the value returned by “newproc” will be zero, so that the statements on lines 1628 to 1635 will not be executed;

1637:

A call is made to “sched” (1940) which, it may be observed, contains an infinite loop, so that it never returns!