LX0-103 · Question #43
Which of the following signals is sent to a process when the key combination CTRL+C is pressed on the keyboard?
The correct answer is B. SIGINT. Pressing CTRL+C in a terminal sends the SIGINT (signal interrupt) signal to the foreground process, requesting it to terminate.
Question
Which of the following signals is sent to a process when the key combination CTRL+C is pressed on the keyboard?
Options
- ASIGTERM
- BSIGINT
- CSIGSTOP
- DSIGKILL
How the community answered
(39 responses)- A3% (1)
- B87% (34)
- C8% (3)
- D3% (1)
Why each option
Pressing CTRL+C in a terminal sends the SIGINT (signal interrupt) signal to the foreground process, requesting it to terminate.
SIGTERM (signal 15) is the default termination signal sent by the kill command without arguments, not generated by CTRL+C.
SIGINT (signal number 2) is the interrupt signal generated by the terminal driver when CTRL+C is pressed. It is sent to the foreground process group and by default causes the process to terminate, though processes can catch and handle it programmatically.
SIGSTOP (signal 19) suspends a process and cannot be caught or ignored; it is sent by CTRL+Z, not CTRL+C.
SIGKILL (signal 9) forcefully kills a process and cannot be caught or handled; it is sent explicitly via kill -9 and is not generated by any keyboard shortcut.
Concept tested: Linux signal handling and keyboard interrupt SIGINT
Source: https://man7.org/linux/man-pages/man7/signal.7.html
Topics
Community Discussion
No community discussion yet for this question.