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

Reply via email to