]> git.ipfire.org Git - thirdparty/gcc.git/commit
libfortran/90038 Reap dead children when wait=.false.
authorjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 19 May 2019 19:38:11 +0000 (19:38 +0000)
committerjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 19 May 2019 19:38:11 +0000 (19:38 +0000)
commit69024fb73f83479ff8c2f21ea137185e8c1464c7
treea13eae10848d4fb1f477e179eefb5f27f860344a
parent1e4b190953da8b1e6118fb4b3bcc3e1306eeb8dd
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  <jb@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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@271384 138bc75d-0d04-0410-961f-82ee72b054a4
libgfortran/ChangeLog
libgfortran/config.h.in
libgfortran/configure
libgfortran/configure.ac
libgfortran/intrinsics/execute_command_line.c