<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/glib.git/gio/gsubprocess.h, branch require-python34</title>
<subtitle>gitlab.gnome.org: GNOME/glib.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/'/>
<entry>
<title>gio/: LGPLv2+ -&gt; LGPLv2.1+</title>
<updated>2017-05-29T17:53:34+00:00</updated>
<author>
<name>Sébastien Wilmet</name>
<email>swilmet@gnome.org</email>
</author>
<published>2017-05-27T16:21:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=3bf4a720c315b5015c8d51edf0b458348f796674'/>
<id>3bf4a720c315b5015c8d51edf0b458348f796674</id>
<content type='text'>
Sub-directories inside gio/ already processed in a previous commit:
- fam/
- gdbus-2.0/ (which contains only codegen/)
- gvdb/
- inotify/
- tests/
- win32/
- xdgmime/

Other sub-directories inside gio/:
- completion/: no license headers
- kqueue/: not LGPL, BSD-style license

https://bugzilla.gnome.org/show_bug.cgi?id=776504
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sub-directories inside gio/ already processed in a previous commit:
- fam/
- gdbus-2.0/ (which contains only codegen/)
- gvdb/
- inotify/
- tests/
- win32/
- xdgmime/

Other sub-directories inside gio/:
- completion/: no license headers
- kqueue/: not LGPL, BSD-style license

https://bugzilla.gnome.org/show_bug.cgi?id=776504
</pre>
</div>
</content>
</entry>
<entry>
<title>Updated FSF's address</title>
<updated>2014-01-31T13:31:55+00:00</updated>
<author>
<name>Daniel Mustieles</name>
<email>daniel.mustieles@gmail.com</email>
</author>
<published>2014-01-23T11:58:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=078dbda148a81af1b3a76fbda72f089b963087f1'/>
<id>078dbda148a81af1b3a76fbda72f089b963087f1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixup GSubprocess documentation bits</title>
<updated>2013-10-17T19:01:42+00:00</updated>
<author>
<name>Ryan Lortie</name>
<email>desrt@desrt.ca</email>
</author>
<published>2013-10-17T19:01:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=542ad4db031273b2ce6416f8909fbff933113ec6'/>
<id>542ad4db031273b2ce6416f8909fbff933113ec6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>gsubprocess: Add UTF-8 variants of communicate()</title>
<updated>2013-10-17T18:32:44+00:00</updated>
<author>
<name>Colin Walters</name>
<email>walters@verbum.org</email>
</author>
<published>2013-10-15T14:04:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=9318d5a4292544f2f7f8f9bc2d805974b3b52c7e'/>
<id>9318d5a4292544f2f7f8f9bc2d805974b3b52c7e</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>gsubprocess: Fix up communicate</title>
<updated>2013-10-17T18:32:44+00:00</updated>
<author>
<name>Colin Walters</name>
<email>walters@verbum.org</email>
</author>
<published>2013-10-14T23:12:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=0e1a3ee3450d1a091234292fde6109bf3c778bab'/>
<id>0e1a3ee3450d1a091234292fde6109bf3c778bab</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>GSubprocess: New class for spawning child processes</title>
<updated>2013-10-17T18:32:44+00:00</updated>
<author>
<name>Colin Walters</name>
<email>walters@verbum.org</email>
</author>
<published>2012-05-17T18:37:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=5b48dc40cc13567d276883ee826fe9e78bc7f46a'/>
<id>5b48dc40cc13567d276883ee826fe9e78bc7f46a</id>
<content type='text'>
There are a number of nice things this class brings:

0) Has a race-free termination API on all platforms (on UNIX, calls to
   kill() and waitpid() are coordinated as not to cause problems).
1) Operates in terms of G{Input,Output}Stream, not file descriptors
2) Standard GIO-style async API for wait() with cancellation
3) Makes some simple cases easy, like synchronously spawning a
   process with an argument list
4) Makes hard cases possible, like asynchronously running a process
   with stdout/stderr merged, output directly to a file path

Much rewriting and code review from Ryan Lortie &lt;desrt@desrt.ca&gt;

https://bugzilla.gnome.org/show_bug.cgi?id=672102
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are a number of nice things this class brings:

0) Has a race-free termination API on all platforms (on UNIX, calls to
   kill() and waitpid() are coordinated as not to cause problems).
1) Operates in terms of G{Input,Output}Stream, not file descriptors
2) Standard GIO-style async API for wait() with cancellation
3) Makes some simple cases easy, like synchronously spawning a
   process with an argument list
4) Makes hard cases possible, like asynchronously running a process
   with stdout/stderr merged, output directly to a file path

Much rewriting and code review from Ryan Lortie &lt;desrt@desrt.ca&gt;

https://bugzilla.gnome.org/show_bug.cgi?id=672102
</pre>
</div>
</content>
</entry>
</feed>
