[Bug libfortran/48961] EXECUTE_COMMAND_LINE(WAIT=.false.) fails on MinGW

thenlich at users dot sourceforge.net gcc-bugzilla@gcc.gnu.org
Sat May 14 14:11:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48961

--- Comment #8 from Thomas Henlich <thenlich at users dot sourceforge.net> 2011-05-14 12:54:26 UTC ---
Maybe I'm wrong, but I'm not sure the current implementation of asynchronous
execution is very efficient (on Unix systems):

We fork() and then call system(), which forks again and runs a shell, then the
shell exits, the forked process inside system() exits, the we exit our forked
process.

I think we might as well just fork and exec the shell directly which would save
one process creation. We also don't need the exit value from the system() call
in Fortran.



More information about the Gcc-bugs mailing list