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 <jamie.gilbertson@luniv.ca>
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)