in reply to windows vs unix: different behaviour with exec()

IIRC, the problem would be the way that exec() is emulated on Windows - it spawns a new process to run the command you specify and exits the current one (it does this because there's no way to re-use the existing process to run the new command).

Most of the time, this implementation is indistinguishable from the UNIX-like exec(), but as you show, not always.

As noted by almut, I think your best bet may be to use system() with a list.

--
.sig : File not found.

  • Comment on Re: windows vs unix: different behaviour with exec()