From f888603842067252f8a9d14eaa9d070ae7b00662 Mon Sep 17 00:00:00 2001 From: Janne Blomqvist Date: Fri, 17 May 2019 21:18:04 +0300 Subject: libfortran/90038: Use posix_spawn instead of fork fork() semantics can be problematic. Most unix style OS'es have posix_spawn which can be used to replace fork + exec in many cases. For more information see e.g. https://www.microsoft.com/en-us/research/uploads/prod/2019/04/fork-hotos19.pdf This replaces the one use of fork in libgfortran with posix_spawn. 2019-05-17 Janne Blomqvist PR libfortran/90038 * configure.ac (AC_CHECK_FUNCS_ONCE): Check for posix_spawn. * intrinsics/execute_command_line (execute_command_line): Use posix_spawn. * Makefile.in: Regenerated. * config.h.in: Regenerated. * configure: Regenerated. Regtested on x86_64-pc-linux-gnu. From-SVN: r271340 --- libgfortran/config.h.in | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libgfortran/config.h.in') diff --git a/libgfortran/config.h.in b/libgfortran/config.h.in index cbd720a2670..da3968cb94f 100644 --- a/libgfortran/config.h.in +++ b/libgfortran/config.h.in @@ -627,6 +627,9 @@ /* Define to 1 if we have POSIX getpwuid_r which takes 5 arguments. */ #undef HAVE_POSIX_GETPWUID_R +/* Define to 1 if you have the `posix_spawn' function. */ +#undef HAVE_POSIX_SPAWN + /* Define to 1 if you have the `pow' function. */ #undef HAVE_POW -- cgit v1.2.3