Foreground Terminal

Every terminal has an associated “foreground” process group ID. When you type Ctrl-C, your terminal sends a signal to every process inside the foreground process group. You can change which process group is in the foreground of a terminal with tcsetpgrp(int fd, pid_t pgrp). The fd should be 0 for “standard input”.


Back to top

hkaiser@cct.lsu.edu

The content of this page has been partially adapted from Berkeley's CS162 course documentation