From 65f037eb323c5229e6655da4f562f7a98fd30eee Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 1 Jan 2009 18:26:59 +0100 Subject: cmdline: exit after --version Don't start the daemon when MPD is called with "--version". --- src/cmdline.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/cmdline.c') diff --git a/src/cmdline.c b/src/cmdline.c index e01521005..35adb2a8d 100644 --- a/src/cmdline.c +++ b/src/cmdline.c @@ -35,6 +35,7 @@ #define SYSTEM_CONFIG_FILE_LOCATION "/etc/mpd.conf" #define USER_CONFIG_FILE_LOCATION ".mpdconf" +G_GNUC_NORETURN static void version(void) { puts(PACKAGE " (MPD: Music Player Daemon) " VERSION " \n" @@ -63,6 +64,8 @@ static void version(void) archive_plugin_init_all(); archive_plugin_print_all_suffixes(stdout); #endif + + exit(EXIT_SUCCESS); } #if GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 12) -- cgit v1.2.3