From 5e253fdd9ac5c8733203eec9870aa0ca2cd238fd Mon Sep 17 00:00:00 2001 From: Mikkel Oscar Lyderik Date: Fri, 26 Feb 2016 09:08:05 +0100 Subject: 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. --- sway/commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sway/commands.c') 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); } -- cgit v1.2.3