This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Add --foreground option for nscd
> +enum
> +{
> + /* Running in foreground but otherwise behave like a daemon,
> + i.e., detach from terminal and use syslog. */
> + RUN_FOREGROUND,
> + /* Running in background as daemon. */
> + RUN_DAEMONIZE,
> + /* Run in foreground in debug mode. */
> + RUN_DEBUG
> +};
> +static int run_mode = RUN_DAEMONIZE;
Make it a named typed and make the variable be of that type.
A bit in the vein of microoptimization, but also what seems
to me normal style for an enum, make the default value be the
first (0) one.
I recall reviewing this when Alex posted it originally but I don't
recall the details. Please check the archives and make sure that
all the review responses from then are addressed in the current
version of the patch.
Thanks,
Roland