On 10/29/13 1:25 PM, Lars T. Kyllingstad wrote:
I'm not suggesting this as a solution for you, but let me just point out
that you wouldn't have to wait until it's done. You'd spawn it and
exit. On Windows this is, as Vladimir points out, exactly what happens
when you call exec*(). On POSIX it comes at the cost of a fork() (which
I completely agree is unacceptable in some situations).
Replacing
return wait(spawnShell(cmd)) != 0;
with
spawnShell(cmd);
return 0;
as the last line of main() produces weird errors, including intermittent
segfaults. Thoughts?
Andrei