Eli Zaretskii wrote in : ... found that the implementation of the exec* family did the following: it started the process that runs the child program, and then immediately exited without waiting for the child to finish. ... The solution was to reimplement execvp in a way that didn't exit ... until the child program finished. Indeed, that is a major problem with these exec* implementations: The parent process cannot know the exit code if the exec'd process runs asynchronously. Another major problem is that the Windows _spawnv* and CreateProcess functions split the arguments when they contain spaces or special characters. All of these problems are fixed with these new Gnulib modules. 2020-12-26 Bruno Haible execlp: Add tests. * tests/test-execlp-main.c: New file. * tests/test-execlp.sh: New file. * modules/execlp-tests: New file. execlp: New module. * lib/execlp.c: New file. * m4/execlp.m4: New file. * modules/execlp: New file. * doc/posix-functions/execlp.texi: Mention more Windows problems and the new module. execle: Add tests. * tests/test-execle-main.c: New file. * tests/test-execle.sh: New file. * modules/execle-tests: New file. execle: New module. * lib/execle.c: New file. * m4/execle.m4: New file. * modules/execle: New file. * doc/posix-functions/execle.texi: Mention more Windows problems and the new module. execl: Add tests. * tests/test-execl-main.c: New file. * tests/test-execl.sh: New file. * modules/execl-tests: New file. execl: New module. * lib/execl.c: New file. * m4/execl.m4: New file. * modules/execl: New file. * doc/posix-functions/execl.texi: Mention more Windows problems and the new module. execv: Add tests. * tests/test-execv-main.c: New file. * tests/test-execv.sh: New file. * modules/execv-tests: New file. execv: New module. * lib/execv.c: New file. * m4/execv.m4: New file. * modules/execv: New file. * doc/posix-functions/execv.texi: Mention more Windows problems and the new module. execvp: Add tests. * tests/test-execvp-main.c: New file. * tests/test-execvp.sh: New file. * modules/execvp-tests: New file. execvp: New module. * lib/execvp.c: New file. * m4/execvp.m4: New file. * modules/execvp: New file. * doc/posix-functions/execvp.texi: Mention more Windows problems and the new module. execvpe: Add tests. * tests/test-execvpe-main.c: New file. * tests/test-execvpe.sh: New file. * modules/execvpe-tests: New file. execvpe: New module. * lib/execvpe.c: New file. * m4/execvpe.m4: New file. * modules/execvpe: New file. * doc/glibc-functions/execvpe.texi: Mention the Windows problems and the new module. execve: Add tests. * tests/test-exec-child.c: New file. * tests/test-execve-main.c: New file. * tests/test-execve.sh: New file. * modules/execve-tests: New file. execve: New module. * lib/execve.c: New file. * m4/execve.m4: New file. * modules/execve: New file. * doc/posix-functions/execve.texi: Mention more Windows problems and the new module. execve, execvpe, execvp, execv, execl, execle, execlp: Prepare modules. * lib/unistd.in.h (execl, execle, execlp, execv, execve, execvp, execvpe): Add declarations for the new modules. * m4/unistd_h.m4 (gl_UNISTD_H): Test whether execl, execle, execlp, execv, execve, execvp, execvpe are declared. (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_EXEC*, HAVE_EXECVPE, REPLACE_EXEC*. * modules/unistd (Makefile.am): Substitute GNULIB_EXEC*, HAVE_EXECVPE, REPLACE_EXEC*. * tests/test-unistd-c++.cc: Check the signature of execl, execle, execlp, execv, execve, execvp, execvpe.