aboutsummaryrefslogtreecommitdiffstats
path: root/common/log.c
diff options
context:
space:
mode:
authorLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-02-26 09:08:05 +0100
committerLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-02-26 09:42:21 +0100
commit5e253fdd9ac5c8733203eec9870aa0ca2cd238fd (patch)
tree3bfaae22500ddfc326dfd4fa4b81bbab285a4c2f /common/log.c
parentMerge pull request #494 from gpyh/argsegfault (diff)
downloadsway-5e253fdd9ac5c8733203eec9870aa0ca2cd238fd.tar.gz
sway-5e253fdd9ac5c8733203eec9870aa0ca2cd238fd.tar.zst
sway-5e253fdd9ac5c8733203eec9870aa0ca2cd238fd.zip
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 'common/log.c')
-rw-r--r--common/log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/log.c b/common/log.c
index adba0021..6d958db2 100644
--- a/common/log.c
+++ b/common/log.c
@@ -58,7 +58,7 @@ void sway_abort(const char *format, ...) {
58 vfprintf(stderr, format, args); 58 vfprintf(stderr, format, args);
59 va_end(args); 59 va_end(args);
60 fprintf(stderr, "\n"); 60 fprintf(stderr, "\n");
61 sway_terminate(); 61 sway_terminate(EXIT_FAILURE);
62} 62}
63 63
64#ifndef NDEBUG 64#ifndef NDEBUG