diff options
author | Janne Blomqvist <jb@gcc.gnu.org> | 2019-05-19 22:38:11 +0300 |
---|---|---|
committer | Janne Blomqvist <jb@gcc.gnu.org> | 2019-05-19 22:38:11 +0300 |
commit | ef536b413e077a87b15a11e60ca4c2675d11dccb (patch) | |
tree | a13eae10848d4fb1f477e179eefb5f27f860344a /libgfortran/configure | |
parent | dbd5df2eb893bf5370fa3fdde6e09f21d4b26b79 (diff) | |
download | gcc-ef536b413e077a87b15a11e60ca4c2675d11dccb.zip gcc-ef536b413e077a87b15a11e60ca4c2675d11dccb.tar.gz gcc-ef536b413e077a87b15a11e60ca4c2675d11dccb.tar.bz2 |
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.
From-SVN: r271384
Diffstat (limited to 'libgfortran/configure')
-rwxr-xr-x | libgfortran/configure | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libgfortran/configure b/libgfortran/configure index 094c732..60867b9 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -2638,6 +2638,8 @@ as_fn_append ac_func_list " link" as_fn_append ac_func_list " symlink" as_fn_append ac_func_list " sleep" as_fn_append ac_func_list " ttyname" +as_fn_append ac_func_list " sigaction" +as_fn_append ac_func_list " waitpid" as_fn_append ac_func_list " alarm" as_fn_append ac_func_list " access" as_fn_append ac_func_list " fork" @@ -12698,7 +12700,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12701 "configure" +#line 12703 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12804,7 +12806,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12807 "configure" +#line 12809 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -16976,6 +16978,10 @@ done + + + + fi # Check strerror_r, cannot be above as versions with two and three arguments exist |