[nsd-users] patch for nsd using hardcoded name "nsd"

Greg A. Woods woods at planix.ca
Thu Jul 16 01:58:20 UTC 2009


At Wed, 15 Jul 2009 18:56:05 -0400 (EDT), Paul Wouters <paul at xelerance.com> wrote:
Subject: [nsd-users] patch for nsd using hardcoded name "nsd"
> 
> Attached patch changes some of the log entries to use argv[0] instead
> of the string "nsd" for logging.

That's a very good idea!

Assuming the final pathname in argv[0] is sufficient for differentiation
in the logs, this expression will provide the appropriate pointer to
just that final pathname component:

    char *argv0 = (argv0 = strrchr(argv[0], '/')) ? argv0 + 1 : argv[0];

-- 
						Greg A. Woods

+1 416 218-0098                VE3TCP          RoboHack <woods at robohack.ca>
Planix, Inc. <woods at planix.com>      Secrets of the Weird <woods at weird.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
URL: <http://lists.nlnetlabs.nl/pipermail/nsd-users/attachments/20090715/d2ba4fdf/attachment.bin>


More information about the nsd-users mailing list