KO Myung-Hun wrote: > > - What is the point of adding wait() and waitid() in patch 1? Nothing in > > spawn-pipe.c nor wait-process.c uses wait(), waitid(). > > > > spawn-pipe.c returns a pid of a child process. If it passes to wait() > and/or waitid(), wait() and waitid() of libcx should be used. > > GNULIB does not allow to use wait(), waitid() and/or waitpid() for a pid > of a child process returned by spawn-pipe.c ?
Correct. The specification in spawn-pipe.h says: After finishing communication, the caller should call wait_subprocess() to get rid of the subprocess in the process table. And wait_subprocess invokes only waitpid. (It could invoke waitid, alternatively, but when we do this, we would create a 'waitid' module for all platforms. Which would be quite some work [1].) Since the 'spawn-pipe' module is at the same level as 'wait-process', I think the workaround with libcx should go into wait-process.c, not waitpid.c. > > - Why is there a separate libcx0? Why is its functionality not folded into > > libc? > > > > I know, it's a final goal of libcx project. See for details: > > > https://github.com/bitwiseworks/libcx/blob/master/README.md#libcx---klibc-extension-library I see. So, I'll accept patches which use libcx0 with dynamic loading, and I'll rely on you to provide updates when the thing is migrated into libc proper. Bruno [1] https://www.gnu.org/software/gnulib/manual/html_node/waitid.html