Can't 'dhcpd -d' in background ?
pica1dilly at yahoo.com
Thu Jul 13 14:31:41 UTC 2006
Simon Hobson <dhcp1 at thehobsons.co.uk> wrote:
>> Joe Bill wrote:
>> run 'dhcpd' as root, off it goes on it's own, running in the background.
>> run 'dhcpd -d', there it runs in the foreground, locking up your terminal.
> I think you've answered your own question (in part).
> d=debug ? If you use -d then the process needs to have sterr
> connected - which effectively means it needs to stay connected to the
> terminal if started from the command line.
Hello Simon. Thanks for your lightning fast reply!
'-d' = debug ? needs to have stderr connected to a terminal ?
Well, but the man page says "dhcpd log to the standard error descriptor",
not that it needs a terminal connected.
Is it that unreasonable to expect that, invoking 'dhcpd -d' detaches dhcpd if
invoking 'dhcpd' does, in light of how the man page describes the '-d' option ?
Can't we expect that '-d' still detaches the dhcpd process, as it's done
without the option, and that if we really want the dhcpd process to run
in the foreground, only then would we specify the '-f' option, additionally
to '-d' ?
> I assume the -f option is for situations where some process (system
> management tool ?) is going to start it as a child and monitor it -
You mean like some "debug" mode ? Aren't the '-d' and '-f' options doing
the same thing then, that is simply running in the foreground ?
> If you want to start it as a child of your terminal, but not lock the
> terminal itself, then you could background it (eg "dhcpd -d &"), but
> it will still be attached to the terminal and will be killed if you
> quit the terminal.
Fortunately, when invoked this way, dhcpd does stay alive.
That's how I boxed the '-d' inconsistency.
But I would rather have :
- '-b' (background) option to go along with '-d', or
- 'dhcpd -d' : run in background and redirect logs to whatever background
stderr , and,
- 'dhcpd -f -d' : run in foreground and redirect logs to the foreground
stderr (terminal ?).
> If you don't want to run dhcpd in your terminal, and you don't know
> what this all means, then the answer is simple : don't specify
> either -d or -f
Simon, the man page says :
"-d flag ... can be useful at sites where complete log of all dhcp activity
must be kept but syslogd is not reliable or otherwise cannot be used."
This makes plenty of sense to me.
This provision hints nothing about connected terminals or foreground processes.
I'm running a special cluster configuration and afforded to save myself
"instancizing" syslogd until now, because all my software components allow
me to redirect a log before reaching the syslog source.
Why couldn't or shouldn't ISC-DHCPD ?
Yahoo! Music Unlimited - Access over 1 million songs.Try it free.
More information about the dhcp-users