Hi Jens,
I've read this thread and was interested in the internals of cb_console_runner. I've had a look at the source code and now I'd like to contribute some code.
Patches are welcome of course.
Have a look at the attached file which is a rewritten version of ConsoleRunner/main.cpp.

My main goal was to avoid the call of system() to avoid that the command line will be evaluated by the system's standard shell a second time. To achieve this under Linux the exec*() functions family provides some means.
For *nix I give the <argv> array directly to execv() to avoid the need to fiddle around with quoting for the arguments again.
Therefore the code to glue together a new command line from the <argv> contents is now only present in the Windows branch of the code. The code still worked so far (tested under WinXP).
:idea: But I have an idea to get around this, too. (Not implemented nor tested so far). I would get the whole Windows command line with GetCommandLine() and then cut off the contents of argv[0] from the result (if needed including quotes). But the rest of the command line is then like it has been given to cb_console_runner and could be given to the CreateProcess() call as is. This avoids
to introduce any quoting issues through cb_console_runner.
Any comments are appreciated. Perhaps somebody of the more Windows aware developers may comment on my idea for the Windows branch?
pirx67
PS.: If PRINT_ARGS is defined then for debugging purposes the currently given arguments are
printed. This part of code should be removed for a release version.