LFCS · Question #856
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. When the Ctrl+C key combination is pressed in a terminal, it sends a specific signal to the foreground process to request its termination.
Question
Options
- ASIGTERM
- BSIGINT
- CSIGSTOP
- DSIGKILL
How the community answered
(24 responses)- A8% (2)
- B88% (21)
- C4% (1)
Why each option
When the Ctrl+C key combination is pressed in a terminal, it sends a specific signal to the foreground process to request its termination.
SIGTERM (Terminate) is a generic termination signal, often sent by the `kill` command, that requests a process to exit gracefully, but it's not the signal generated by CTRL+C.
Pressing CTRL+C in a terminal sends the SIGINT (Signal Interrupt) signal to the active foreground process group, which is typically designed to cause the process to terminate gracefully by allowing it to perform cleanup operations.
SIGSTOP (Stop) is a signal that pauses a process, typically generated by pressing CTRL+Z, and does not terminate the process.
SIGKILL (Kill) is a robust, unblockable signal that immediately forces a process to terminate without any opportunity for cleanup, and it is not generated by CTRL+C.
Concept tested: Linux signals (SIGINT)
Source: https://man7.org/linux/man-pages/man7/signal.7.html
Topics
Community Discussion
No community discussion yet for this question.