From c397c5f72d8d22473229c644e3d0b0a0fd786217 Mon Sep 17 00:00:00 2001 From: Jamie Gilbertson Date: Sat, 10 Mar 2012 23:02:11 -0700 Subject: [PATCH] Honor the debug option (we fork before parsing config) afpd doesn't actually respect the debug command-line option, because obj.options.flags isn't updated until after afpd has already daemonized itself. Changed to check obj.cmdlineflags instead. Signed-off-by: Jamie Gilbertson --- etc/afpd/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/afpd/main.c b/etc/afpd/main.c index ac95bb8c..733ab68b 100644 --- a/etc/afpd/main.c +++ b/etc/afpd/main.c @@ -224,7 +224,7 @@ int main(int ac, char **av) if (check_lockfile("afpd", _PATH_AFPDLOCK) != 0) exit(EXITERR_SYS); - if (!(obj.options.flags & OPTION_DEBUG) && (daemonize(0, 0) != 0)) + if (!(obj.cmdlineflags & OPTION_DEBUG) && (daemonize(0, 0) != 0)) exit(EXITERR_SYS); if (create_lockfile("afpd", _PATH_AFPDLOCK) != 0) -- 2.39.2