On success, the PID of the child process is returned in the parent’s thread of execution, and a 0 is returned in the child’s thread of e
p = fork(); /* assume no errors */ /* you now have two */ /* programs running */ -------------------- if (p > 0) { | if (p == 0) { printf("parent\n"); | printf("child\n"); ... | ...