warnings from backtrace

Gary E. Miller gem at rellim.com
Sat Jun 3 19:09:58 UTC 2017


Yo Hal!

On Sat, 03 Jun 2017 03:34:28 -0700
Hal Murray <hmurray at megapathdsl.net> wrote:

> > The easy solution would be to just fall back to STDERR in assert()
> > and traps, but I'm not ready to give up on mysyslog() just yet.   
> 
> That's no good.  The normal case for ntpd is running detached with no
> stdio.

In this case, stdin has nothing to do with stderr.

And I said 'fall back to stderr'.  Can't fall back to stderr once
ntpd forks to background and closes stderr.

But there are lot's of cases before the fork when all output was turned
off.

> I see that you have "fixed" things so that the normal startup now
> prints two log lines on the terminal before detatching.

Better too much than too little.  I can't duplicate what you see.  If
you explain your test case I can tweak it.

> We need another hack to generate an assert failure after the detach.

Huh?  Assert failures are trivial to force, just add this where you
want to test:
	REQUIRE(0 == progname)

progname is a global char*, so that will always fail and give you a
nice assert ffailure.


RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20170603/b0e8596a/attachment.bin>


More information about the devel mailing list