diff options
author | Marius Vlad <marius.vlad@collabora.com> | 2020-05-08 23:05:45 +0300 |
---|---|---|
committer | Marius Vlad <marius.vlad@collabora.com> | 2020-05-12 22:25:35 +0300 |
commit | ac4e3581fb1834a7d28eeaa2575777635d790279 (patch) | |
tree | bc33ef32181a07fe6379d2ec3632be63da6ca5ac | |
parent | 61dea1841a4b6ef64e3a96c2ae69c1db8dded072 (diff) |
main: Add a (valid) return code when exiting
Bug-AGL: SPEC-3352
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Id466a9d5bc253e5c65f7f2db328b6ea794457726
-rw-r--r-- | src/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1131,6 +1131,7 @@ int main(int argc, char *argv[]) struct weston_log_context *log_ctx = NULL; struct weston_log_scope *log_scope; struct weston_log_subscriber *logger; + int ret = EXIT_FAILURE; const struct weston_option core_options[] = { { WESTON_OPTION_STRING, "backend", 'B', &backend }, @@ -1164,7 +1165,7 @@ int main(int argc, char *argv[]) log_ctx = weston_log_ctx_compositor_create(); if (!log_ctx) { fprintf(stderr, "Failed to initialize weston debug framework.\n"); - return EXIT_FAILURE; + return ret; } log_scope = weston_compositor_add_log_scope(log_ctx, "log", @@ -1254,6 +1255,8 @@ int main(int argc, char *argv[]) wl_display_run(display); + ret = ivi.compositor->exit_code; + wl_display_destroy_clients(display); error_compositor: @@ -1279,4 +1282,6 @@ error_signals: log_file_close(); if (ivi.config) weston_config_destroy(ivi.config); + + return ret; } |