aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-09-24 21:40:05 +0200
committerMax Kellermann <max@duempel.org>2009-09-24 21:40:05 +0200
commit1b227e01458e5db2b1ae80ae8501837f3206c1ac (patch)
treec2d550ad02d7721f2ee7bfd63fbad2bbd81170ca /src/main.c
parent308b3f2337f100b5d27fa2af50bf929caff4a7d4 (diff)
downloadmpd-1b227e01458e5db2b1ae80ae8501837f3206c1ac.tar.gz
mpd-1b227e01458e5db2b1ae80ae8501837f3206c1ac.tar.xz
mpd-1b227e01458e5db2b1ae80ae8501837f3206c1ac.zip
cmdline: handle fatal errors with GError
Don't call g_error(), which will abort the process and dump core.
Diffstat (limited to '')
-rw-r--r--src/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 0d7cbf1ed..952e6d1fe 100644
--- a/src/main.c
+++ b/src/main.c
@@ -295,7 +295,12 @@ int main(int argc, char *argv[])
tag_pool_init();
config_global_init();
- parse_cmdline(argc, argv, &options);
+ success = parse_cmdline(argc, argv, &options, &error);
+ if (!success) {
+ g_warning("%s", error->message);
+ g_error_free(error);
+ return EXIT_FAILURE;
+ }
glue_daemonize_init(&options);