dhcpcd-discuss

Re: Question about DHCPv6 timeout behavior

Roy Marples

Thu Mar 16 12:40:09 2017

Hi Harald

On 16/03/2017 11:11, Harald Albrecht wrote:
> thank you for kindly offering your help!
> 
> I'll come up with a log file later; I've now noticed that while dhcpcd
> used to use the sylog call there seems to be some change after 6.7.1
> (yeah, really old, I know) that now causes the logging output of dhcpcd
> to become buffered when run inside a simple docker container that uses
> the console for syslog logging. With dhcpcd 6.7.1 the logging output is
> synchonous, as need for debugging. Any idea what may cause this changed
> behavior? I've tested both very recent dhcpd versus 6.7.1 in the same
> container and they behave differently. *scratch* *scratch*

Newer versions have a logger function to make the output more pretty as
some platforms have really ugly (or in the case of Solaris) lack the
means to report to the console via syslog. These versions logged
informational stuff to stdout and errors to stderr.
As you point out, stdout is buffered and it's not flushed whereas stderr
should always be non buffered.

Shortly after 6.11.5, I changed it to always log to stderr, like syslog.
Patch here:
https://dev.marples.name/rDHC780602be948eb87bd6822940403b0a182d5fd7a4

Let me know if that helps you.

Roy


References:
Question about DHCPv6 timeout behaviorHarald Albrecht
Re: Question about DHCPv6 timeout behaviorRoy Marples
Re: Question about DHCPv6 timeout behaviorHarald Albrecht
Archive administrator: postmaster@marples.name