Am 16.05.19 um 22:10 schrieb Janne Blomqvist:
On Thu, May 16, 2019 at 10:59 PM Thomas Koenig <tkoe...@netcologne.de> wrote:
Hi Janne,
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.
Do I understand the patch correctly that we would no longer use fork()
if posix_spawn is not available? I think we should leave that in as
a fallback option.
Yes. But there is already a fallback in case posix_spawn (or
previously, fork) is not available, namely falling back to synchronous
behavior. Since this is anyway somewhat of a corner case (namely, with
wait=.false.), and posix_spawn is supported on all (well, at least
Linux, macOS, *BSD, cygwin, Solarix, AIX) remotely modern unix type
systems, a further fallback to fork() is IMHO not warranted.
I differ there.
Regards
Thomas