This preview shows page 1. Sign up to view the full content.
Unformatted text preview: d and will eventually be scheduled. Stopped. The execution of the process is suspended and will not be scheduled. A process stops as a result of receiving a SIGSTOP, SIGTSTP, SIGTTIN, or SIGTTOU signal, and it remains stopped until it receives a SIGCONT signal, at which point is becomes running again. (A signal is a form of software interrupt that is described in detail in Section 8.5.) Terminated. The process is stopped permanently. A process becomes terminated for one of three reasons: (1) receiving a signal whose default action is to terminate the process; (2) returning from the main routine; or (3) calling the exit function: #include <stdlib.h> void exit(int status);
this function does not return The exit function terminates the process with an exit status of status. (The other way to set the exit status is to return an integer value from the main routine.) A parent process creates a new running child process by calling the fork function. 8.4. PROCESS CONTROL
#include <unistd.h> #include <sys/types.h> pid t fork(void); 405 returns: 0...
View Full Document