This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ending it a SIGCONT signal, and then runs it in the background. The <job> argument can be either a PID or a JID. The fg <job> built-in command restarts <job> by sending it a SIGCONT signal, and then runs it in the foreground. The shell reaps all of its zombie children. If any job terminates because it receives a signal that was not caught, then the shell prints a message to the terminal with the job’s PID and a description of the offending signal. ¯ ¯ ¯ ¯ ¯ ¯ ¯ Figure 8.36 shows an example shell session. 448 CHAPTER 8. EXCEPTIONAL CONTROL FLOW unix> ./shell Run your shell program > bogus bogus: Command not found. Execve can’t find executable > foo 10 Job 5035 terminated by signal: Interrupt User types ctrl-c > foo 100 &  5036 foo 100 & > foo 200 &  5037 foo 200 & > jobs  5036 Running foo 100 &  5037 Running foo 200 & > fg %1 Job  5036 stopped by signal: Stopped User types ctrl-z > jobs  5036 Stopped foo 100 &a...
View Full Document
- Spring '10
- The American