🐧

Understanding Linux Signals and SIGINT

Jun 4, 2025

Linux Signals and Process Interruption

Introduction to Signals in Linux

  • Linux processes can receive various signals.
  • Signals are labeled with names starting with sig.

SIGINT Signal

  • SIGINT (Signal Interrupt):
    • Used to interrupt a process.
    • Default action: terminate the process being interrupted.
    • Can be sent using the keyboard combination Ctrl + C.

Demonstration

  • Example with pseudo parted:
    • Start a program, e.g., pseudo parted.
    • While in the parted tool, use Ctrl + C to interrupt.
    • The process is aborted, and control returns to the shell.

Key Points

  • SIGINT is a useful signal for terminating processes in Linux.
  • The process interruption can be done midway using Ctrl + C.
  • Similar functionality to Windows process interruption.