But now it's in SVN and should work, at least a little bit.
Nice work, Enrico - it looks like a great start!
But I'm running into a some problems, along with a few other comments...
My system is set to plain old-fashioned ASCII, and the g_get_charset() call in utils_set_up_io_channel() returns "ANSI_X3.4-1968" but apparently g_io_channel_read_line() doesn't like this, it still tries to read UTF-8, which causes it to fail, and cc_iofunc() never finishes reading, which causes something like an endless loop. That smells like a bug in the glib documentation, but at any rate changing the encoding to NULL for g_io_channel_set_encoding() seems to solve the problem. ( That's really weird, because the build commands have always worked fine, I'm not sure why this is any different. )
I also don't think the g_io_channel_read_line() loop is quite right, it seems like it should keep looping as long as it returns G_IO_STATUS_NORMAL or G_IO_STATUS_AGAIN, and the cc_iofunc() should *always* return false, because unless you save the contents of the GString somewhere, it will always get clobbered if the function gets called more than once.
Finally, this one doesn't appear to cause any problems, but regarding the write() call in tools_execute_custom_command() the libc documentation says:
"Your program should always call write in a loop, iterating until all the data is written."
so I think it might be better to make sure all the data gets written, just in case.
Here is a patch with the above-mentioned changes, any opinions/feedback are welcome.
Regards, - Jeff