3

When you press Ctrl+C in the terminal, a SIGINT signal will be sent to the foreground process group.

Now there are other signals that you can send in the terminal (for example: Ctrl+Z). Are all of these signals get sent to the foreground process group also, or are there some signals that get sent to the background process groups?

1 Answer 1

1

All keyboard signals are sent to the foreground process group only.

Sometimes a signal is sent to all processes in the session but those are not generated by the terminal. When the shell (at leastbash) receives SIGHUP then it sends this signal (by default) to all its child processes. And bash can be configured to send SIGHUP to all jobs when it exits (huponexit).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .