This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] elf: Add tst-ldconfig-bad-aux-cache test [BZ #18093]


* 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]