mirror of
https://github.com/swaywm/sway.git
synced 2025-11-07 13:29:56 -05:00
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.
This commit is contained in:
parent
40b3215444
commit
5e253fdd9a
9 changed files with 24 additions and 20 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue