bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

new modules execve, execvpe, execvp, execv, execl, execle, execlp


From: Bruno Haible
Subject: new modules execve, execvpe, execvp, execv, execl, execle, execlp
Date: Sat, 26 Dec 2020 14:53:36 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-197-generic; KDE/5.18.0; x86_64; ; )

Eli Zaretskii wrote in
<https://lists.gnu.org/archive/html/bug-grep/2014-05/msg00118.html>:

  ... 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  <bruno@clisp.org>

        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.

Attachment: 0001-execve-execvpe-execvp-execv-execl-execle-execlp-Prep.patch
Description: Text Data

Attachment: 0002-execve-New-module.patch
Description: Text Data

Attachment: 0003-execve-Add-tests.patch
Description: Text Data

Attachment: 0004-execvpe-New-module.patch
Description: Text Data

Attachment: 0005-execvpe-Add-tests.patch
Description: Text Data

Attachment: 0006-execvp-New-module.patch
Description: Text Data

Attachment: 0007-execvp-Add-tests.patch
Description: Text Data

Attachment: 0008-execv-New-module.patch
Description: Text Data

Attachment: 0009-execv-Add-tests.patch
Description: Text Data

Attachment: 0010-execl-New-module.patch
Description: Text Data

Attachment: 0011-execl-Add-tests.patch
Description: Text Data

Attachment: 0012-execle-New-module.patch
Description: Text Data

Attachment: 0013-execle-Add-tests.patch
Description: Text Data

Attachment: 0014-execlp-New-module.patch
Description: Text Data

Attachment: 0015-execlp-Add-tests.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]