[PATCH v2] elf: Add tst-ldconfig-bad-aux-cache test [BZ #18093]
Florian Weimer
fweimer@redhat.com
Thu May 9 12:32:00 GMT 2019
* Alexandra Hájková:
> + pid = fork ();
I think this should use xfork for error checking.
> + /* Run ldconfig fist to generate the aux-cache. */
> + if (!pid)
> + {
> + execv (args[0], args);
> + }
This should call _exit after execve, in case of failure.
!pid should be written pid == 0, per our style rules, because it is not
a boolean variable.
However, we have recently added support_subprogram, in
<support/subprocess.h>. Maybe you could use that instead? It should
take care of all the details, including calling xwaitpid.
Thanks,
Florian
More information about the Libc-alpha
mailing list