130
Terminated by Ctrl+C
Script terminated by Control-C
Signal
Exit Code Information
Exit Code
130
Name
Terminated by Ctrl+C
Category
Signal
Usage Context
User pressed Ctrl+C to terminate execution
Common Usage
Bash Script
#!/bin/bash if [ condition ]; then echo "Terminated by Ctrl+C" exit 130 fi
Check Exit Code
./script.sh echo $? # Prints the exit code # Check if exit code matches if [ $? -eq 130 ]; then echo "Terminated by Ctrl+C" fi
Node.js/JavaScript
// Exit with code 130
process.exit(130);
// Or throw error that results in exit code
if (error) {
console.error('Terminated by Ctrl+C');
process.exit(130);
}Python
import sys
# Exit with code 130
if error:
print("Terminated by Ctrl+C")
sys.exit(130)Exit Code 130 - Terminated by Ctrl+C
Script terminated by Control-C User pressed Ctrl+C to terminate execution Exit codes are used to indicate the success or failure of a program or script. A value of 0 typically indicates success, while non-zero values indicate various types of errors or specific conditions.