previous | start | next

Signals and Job Control

At any time there is at most one foreground job.

The shell itself is not in the job list.

The fg and bg commands are used on jobs in the background.

Signals from the keyboard can also affect jobs.

  1. ctrl-c sends a SIGINT (interrupt) signal to the shell, which should be forwarded to the foreground job.
  2. ctrl-z sends a SIGTSTP (stop) signal to the shell, which should be forwarded to the foreground job.
  3. ctrl-\ sends a SIGQUIT (quit) signal to the shell.

A handler for SIGQUIT is provided. It just prints a message and the shell exits. Don't change this, you may need it to terminate a buggy shell.



previous | start | next