[Bug libfortran/48961] EXECUTE_COMMAND_LINE(WAIT=.false.) fails on MinGW
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed May 11 19:54:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48961
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-05-11 19:19:40 UTC ---
Created attachment 24226
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24226
Draft patch (untested)
(In reply to comment #2)
> The program is executed, as the called program "hello.exe" prints "Hello
> world". After that hello.exe returns and the runtime error occurs.
As cmdstat is set to -2, there will be an error in set_cmdstat:
else if (value != 0)
runtime_error ("Could not execute command line");
The check should be > 0.
> Further testing shows that it is executed synchronously, presumably because
> asynchronous execution is not implemented (yet?) on Windows.
Indeed. That seems to be the problem. fork() does not seem to be supported. Kai
suggests to use _spawnvpe with cmd.exe/command.com
More information about the Gcc-bugs
mailing list