the four main calls in Process API
fork, wait, exec, kill
how does fork() work?
creates a child process that is almost an exact copy of the parent with a DIFFERENT pid, has its own registers, own PC, the return value however is 0.
return value of fork()
0 for child.
< 0 failed.
>0 is parent
how does the wait() call work?
parent calls it to wait for child to return. so parent can act after the children returns
how does the exec() call work?
run a program that is different from the calling program.
how does the kill() call work
send signals to a process, including directives to go to sleep, die and other useful imperatives.