09/02/2022 16:45, Stephen Hemminger: > On Wed, 09 Feb 2022 15:58:26 +0100 > Thomas Monjalon <tho...@monjalon.net> wrote: > > > 02/02/2022 20:47, Stephen Hemminger: > > > The rte_eal_init function looks at argv[0] to determine > > > the program name to pass to the log init function. > > > This is both unnecessary and in a corner case a problem. > > > > > > Parsing argv[0] is unnecessary because the function openlog() > > > already determines the log identifier from program name if > > > NULL is passed, see openlog man page: > > > The string pointed to by ident is prepended to every message, and is > > > typically set to the program name. If ident is NULL, the program name > > > is used. (POSIX.1-2008 does not specify the behavior when ident is > > > NULL.) > > > > What about POSIX warning? > > Did you test it? Which libc? What about musl? > > Source for musl shows that openlog accepts NULL as ident. > It then generates log messages with ident in the message.
In this case, it will be empty string. It seems this solution does not work with musl.