The relevant code looks like:

  if (testmode)
     {
       fprintf(stderr, "dnsmasq: %s.\n", _("syntax check OK"));
       exit(0);
     }

So it's not an accident, but the reason it's like that is rather lost in the mists of time.

Can you take advantage of the fact that the exit code is zero when the test passes, but non-zero if there's an error?

My ideal scenario would be to suppress the OK and print out any descriptive error (whatever dnsmasq tells me), so it's not just it worked or it didn't. I can try to use the exit code but I can only think of very clumsy ways to extract error messages only...


Out of curiosity is there an interest in correcting this the OK message to stdout?

Thanks




_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

Reply via email to