https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90038

--- Comment #9 from Janne Blomqvist <jb at gcc dot gnu.org> ---
Author: jb
Date: Sun May 19 19:38:11 2019
New Revision: 271384

URL: https://gcc.gnu.org/viewcvs?rev=271384&root=gcc&view=rev
Log:
libfortran/90038 Reap dead children when wait=.false.

When using posix_spawn or fork to launch a child process, the parent
needs to wait for the child, otherwise the dead child is left as a
zombie process. For this purpose one can install a signal handler for
SIGCHLD.

2019-05-19  Janne Blomqvist  <j...@gcc.gnu.org>

        PR libfortran/90038
        * intrinsics/execute_command_line (sigchld_handler): New function.
        (execute_command_line): Install handler for SIGCHLD.
        * configure.ac: Check for presence of sigaction and waitpid.
        * config.h.in: Regenerated.
        * configure: Regenerated.

Regtested on x86_64-pc-linux-gnu.

Modified:
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/config.h.in
    trunk/libgfortran/configure
    trunk/libgfortran/configure.ac
    trunk/libgfortran/intrinsics/execute_command_line.c

Reply via email to