summaryrefslogtreecommitdiff
path: root/sway/commands.c
diff options
context:
space:
mode:
authorMikkel Oscar Lyderik <[email protected]>2016-02-26 09:08:05 +0100
committerMikkel Oscar Lyderik <[email protected]>2016-02-26 09:42:21 +0100
commit5e253fdd9ac5c8733203eec9870aa0ca2cd238fd (patch)
tree3bfaae22500ddfc326dfd4fa4b81bbab285a4c2f /sway/commands.c
parent40b3215444ed48d2ed9bbaa00f20f266f5318f5a (diff)
Correctly exit sway on errors.
Calling `exit` in sway_terminate prevents sway from correctly shutting down (freeing data, cleanly terminating the ipc server, etc.). A better way is to exit straight away if the failure occurs before `wlc_run` and use sway_abort as usual if it occur when wlc is running.
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 055473d5..c4b7f6ab 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -450,7 +450,7 @@ static struct cmd_results *cmd_exit(int argc, char **argv) {
}
// Close all views
close_views(&root_container);
- sway_terminate();
+ sway_terminate(EXIT_SUCCESS);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
}