Colin Walters 0e1a3ee345 gsubprocess: Fix up communicate
We weren't closing the streams after we were done reading or writing,
which is kind of essential.  The easy way to fix this is to just use
g_output_stream_splice() to a GMemoryOutputStream rather than
hand-rolling it.  This results in a substantial reduction of code
complexity.

A second serious issue is that we were marking the task as complete when
the process exits, but that's racy - there could still be data to read
from stdout.  Fix this by just refcounting outstanding operations.

This code, not surprisingly, looks a lot like the "multi" test.

Next, because processes output binary data, I'd be forced to annotate
the char*/length pairs as (array) (element-type uint8).  But rather than
doing that, it's *far* simpler to just use GBytes.

We need a version of this that actually validates as UTF-8, that will be
in the next patch.
2013-10-17 14:32:44 -04:00
..
2013-07-11 12:35:45 -04:00
2010-07-05 00:56:12 -04:00
2013-07-11 13:49:20 -04:00
2012-10-16 09:39:24 -04:00
2013-05-29 09:03:32 -04:00
2012-10-16 09:39:24 -04:00
2010-04-17 01:48:05 -04:00
2012-10-16 09:39:24 -04:00
2013-06-02 09:53:24 -04:00
2012-10-16 09:39:24 -04:00
2012-10-16 09:39:24 -04:00
2013-06-02 01:42:28 -04:00
2012-10-16 09:39:24 -04:00
2012-10-16 09:39:24 -04:00
2012-10-16 09:39:24 -04:00
2012-10-16 09:39:24 -04:00
2012-10-16 09:39:24 -04:00
2013-09-23 16:31:40 -04:00
2013-06-02 01:44:15 -04:00
2013-06-02 20:02:06 -04:00
2013-10-17 14:32:44 -04:00
2012-10-16 09:39:24 -04:00
2012-10-16 09:39:24 -04:00
2013-03-13 09:41:09 -04:00
2013-06-02 01:46:21 -04:00
2013-06-02 20:02:06 -04:00
2012-10-16 09:39:24 -04:00
2012-10-16 09:39:24 -04:00
2012-10-16 09:39:24 -04:00
2012-10-16 09:39:24 -04:00
2012-10-16 09:39:24 -04:00
2012-10-16 09:39:24 -04:00
2012-10-16 09:39:24 -04:00
2012-10-16 09:39:24 -04:00
2012-10-16 09:39:24 -04:00
2012-10-16 09:39:24 -04:00
2012-01-13 17:12:53 +01:00
2012-01-13 17:12:53 +01:00
2012-01-13 17:12:53 +01:00
2012-01-13 17:12:53 +01:00
2012-01-13 17:12:53 +01:00
2012-01-13 17:12:53 +01:00
2012-10-16 09:39:24 -04:00
2012-12-12 15:20:22 +01:00
2012-10-16 09:39:24 -04:00
2012-10-16 09:39:24 -04:00
2012-10-16 09:39:24 -04:00