From 019c1178a21e027099a52903a03443f94f100d8f Mon Sep 17 00:00:00 2001 From: Frank Benkstein Date: Thu, 4 Oct 2007 13:43:20 +0200 Subject: [PATCH] src/vlock-main.c: check for error in dependency handling --- src/vlock-main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/vlock-main.c b/src/vlock-main.c index 4b3d965..dd922d5 100644 --- a/src/vlock-main.c +++ b/src/vlock-main.c @@ -212,7 +212,14 @@ int main(int argc, char *const argv[]) fatal_error("vlock-main: loading plugin '%s' failed: %s", argv[i], STRERROR); ensure_atexit(unload_plugins); - resolve_dependencies(); + + if (!resolve_dependencies()) { + if (errno == 0) + exit(EXIT_FAILURE); + else + fatal_error("vlock-main: error resolving plugin dependencies: %s", STRERROR); + } + plugin_hook("vlock_start"); ensure_atexit(call_end_hook); #else /* !USE_PLUGINS */ -- 2.11.4.GIT