Skip to content
The Signal Belfry

/static/campanario/en/sino/sigint/

Menu

SIG-002 · Termination

SIGINT

Ctrl+C: the interruption that leaves the keyboard and arrives as a signal.

It is the most rung bell in the system, and almost nobody calls it by name. When you press Ctrl+C, the terminal driver — a direct heir of the teletype — turns the two keys into a SIGINT for the foreground process group.

Well-mannered programs catch it to undo what was half done: delete the temporary file, restore the cursor, and only then exit. And the shell records the death in the exit status: 130, which is 128 + 2 — the bell's number.

$ ping stickybit.com.br
64 bytes from 172.67.163.19: icmp_seq=1 ttl=52 time=12.4 ms
^C
--- stickybit.com.br ping statistics ---
1 packets transmitted, 1 received, 0% packet loss
$ echo $?
130
Two keys, one signal, and exit status 128 + 2.