Cancel / Interrupt (SIGINT)
What is Cancel / Interrupt (SIGINT)?
Cancel / Interrupt (SIGINT): Stop the running command — send an interrupt signal to whatever is in the foreground. Pressing Ctrl+C in a terminal sends an interrupt signal, SIGINT, to the program running in the foreground. Most programs stop when they receive it. It is the standard way to stop a development server, a long-running script or a command you started by mistake. Well-written programs catch the signal and clean up first, for example by finishing the current database write or removing temporary files.
Frequently asked questions about Cancel / Interrupt (SIGINT)
What should you keep in mind with Cancel / Interrupt (SIGINT)?
If a program ignores Ctrl+C, try pressing it again, or Ctrl+\ for a stronger quit signal. As a last resort, find the process ID and use kill. Be careful with long data operations such as imports or migrations. Interrupting halfway can leave data in an inconsistent state, so design such scripts to be safe to run again.
At a glance
| Category | Keyboard shortcuts |
|---|---|
| Explained by | Reinier de la Parra |
| Updated |