Status code to signal name translate
status2signal
is a tool to translate status code to signal name written in portable sh
inspired by Fish's fish_status_to_signal
command and Starship's Status module.
- Unix commands to process
Option 1: using curl
curl https://raw.githubusercontent.com/info-mono/status2signal/main/bin/status2signal > ~/.local/bin/status2signal
chmod +x ~/.local/bin/status2signal
Option 2: using git
git clone https://github.com/info-mono/status2signal.git ~/.local/share/status2signal
ln -s ~/.local/share/status2signal/bin/status2signal ~/.local/bin/status2signal
For Bpkg user:
bpkg install info-mono/status2signal
For Basher user:
basher install info-mono/status2signal
If you can and want to port status2signal to other package managers, feel free to do so.
Run 'status2signal' in the terminal:
status2signal STATUSCODES
Here is the list of statuses and signals that they will be translated to:
Status | Signal |
---|---|
0 |
empty |
1 |
ERROR |
2 |
USAGE |
126 |
NOPERM |
127 |
NOTFOUND |
129 |
SIGHUP |
130 |
SIGINT |
131 |
SIGQUIT |
132 |
SIGILL |
133 |
SIGTRAP |
134 |
SIGABRT |
135 |
SIGBUS |
136 |
SIGFPE |
137 |
SIGKILL |
138 |
SIGUSR1 |
139 |
SIGSEGV |
140 |
SIGUSR2 |
141 |
SIGPIPE |
142 |
SIGALRM |
143 |
SIGTERM |
144 |
SIGSTKFLT |
145 |
SIGCHLD |
146 |
SIGCONT |
147 |
SIGSTOP |
148 |
SIGTSTP |
149 |
SIGTTIN |
150 |
SIGTTOU |
151 |
SIGURG |
152 |
SIGXCPU |
153 |
SIGXFSZ |
154 |
SIGVTALRM |
155 |
SIGPROF |
156 |
SIGWINCH |
157 |
SIGIO |
158 |
SIGPWR |
159 |
SIGSYS |
Other positive integer will be translated to
ERROR
.
Special thanks to:
Made with ❤️ by
@info-mono