gsubprocess: Add UTF-8 variants of communicate()
authorColin Walters <walters@verbum.org>
Tue, 15 Oct 2013 14:04:54 +0000 (15:04 +0100)
committerRyan Lortie <desrt@desrt.ca>
Thu, 17 Oct 2013 18:32:44 +0000 (14:32 -0400)
commit9318d5a4292544f2f7f8f9bc2d805974b3b52c7e
treea1b11496c4071eefef67547e814789ad40d09d50
parent0e1a3ee3450d1a091234292fde6109bf3c778bab
gsubprocess: Add UTF-8 variants of communicate()

Over many years of writing code interacting with subprocesses, a pattern
that comes up a lot is to run a child and get its output as UTF-8, to
put inside a JSON document or render in a GtkTextBuffer, etc.

It's very important to validate at the boundaries, and not say deep
inside Pango.

We could do this a bit more efficiently if done in a streaming fashion,
but realistically this should be OK for now.
gio/gsubprocess.c
gio/gsubprocess.h
gio/tests/gsubprocess.c