Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

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

This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online