nerdexam
CompTIA

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.

GNU and Unix Commands

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)
  • A
    3% (1)
  • B
    87% (34)
  • C
    8% (3)
  • D
    3% (1)

Why each option

Pressing CTRL+C in a terminal sends the SIGINT (signal interrupt) signal to the foreground process, requesting it to terminate.

ASIGTERM

SIGTERM (signal 15) is the default termination signal sent by the kill command without arguments, not generated by CTRL+C.

BSIGINTCorrect

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.

CSIGSTOP

SIGSTOP (signal 19) suspends a process and cannot be caught or ignored; it is sent by CTRL+Z, not CTRL+C.

DSIGKILL

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

#signals#SIGINT#process control#keyboard shortcuts

Community Discussion

No community discussion yet for this question.

Full LX0-103 Practice