The SIGCHLD handler in the GTK port collects the exit status of all child processes, regardless of where they were launched. This for example prevents Lua scripts from knowing the exit status of children launched from Lua: the handler kicks in before Lua has a chance to call wait().
The process-launching facilities of the GTK port should be probably re-written to use g_spawn_async() and g_child_watch_add().
Sounds reasonable but this is a low priority for me so depends on someone willing to contribute an implementation.
Attaching a minimal patch.
Last edit: felix 2013-11-26
Since g_spawn_async_with_pipes creates the pipe, shouldn't the call to pipe and the pipefds variable be removed?
It should. I noticed that at the very last moment, and amended the patch, but it seems that I uploaded the old version.
Committed as [96dcfd].
Related
Commit: [96dcfd]