fix and document the exit status
This commit is contained in:
parent
9cd8d4dd71
commit
c61a23e4d6
|
@ -3,6 +3,10 @@ A simple VTE-based terminal.
|
||||||
Termite looks for ``termite.cfg`` in ``$XDG_CONFIG_HOME`` (or ``~/.config`` if
|
Termite looks for ``termite.cfg`` in ``$XDG_CONFIG_HOME`` (or ``~/.config`` if
|
||||||
unset) and then falls back to ``$XDG_CONFIG_DIRS``.
|
unset) and then falls back to ``$XDG_CONFIG_DIRS``.
|
||||||
|
|
||||||
|
Termite's exit status is 1 on a failure, including a termination of the child
|
||||||
|
process from an uncaught signal. Otherwise the exit status is that of the child
|
||||||
|
process.
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
============
|
============
|
||||||
|
|
||||||
|
|
|
@ -1147,8 +1147,13 @@ static void load_config(GtkWindow *window, VteTerminal *vte, config_info *info,
|
||||||
}/*}}}*/
|
}/*}}}*/
|
||||||
|
|
||||||
static void exit_with_status(VteTerminal *vte) {
|
static void exit_with_status(VteTerminal *vte) {
|
||||||
|
int status = vte_terminal_get_child_exit_status(vte);
|
||||||
gtk_main_quit();
|
gtk_main_quit();
|
||||||
exit(vte_terminal_get_child_exit_status(vte));
|
if (WIFEXITED(status)) {
|
||||||
|
exit(WEXITSTATUS(status));
|
||||||
|
} else {
|
||||||
|
exit(EXIT_FAILURE); // child did not exit normally
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
|
|
Loading…
Reference in New Issue