GSubprocess: New class for spawning child processes
authorColin Walters <walters@verbum.org>
Thu, 17 May 2012 18:37:17 +0000 (14:37 -0400)
committerRyan Lortie <desrt@desrt.ca>
Thu, 17 Oct 2013 18:32:44 +0000 (14:32 -0400)
commit5b48dc40cc13567d276883ee826fe9e78bc7f46a
tree138766e66a96c79a5d64d79e2911609d7f9b9dfa
parente30bbca6679605487e52e52f810c54a0464b6d37
GSubprocess: New class for spawning child processes

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 <desrt@desrt.ca>

https://bugzilla.gnome.org/show_bug.cgi?id=672102
17 files changed:
docs/reference/gio/gio-docs.xml
docs/reference/gio/gio-sections.txt
docs/reference/gio/gio.types
gio/Makefile.am
gio/gio.h
gio/gioenums.h
gio/giotypes.h
gio/glib-compile-resources.c
gio/gsubprocess.c [new file with mode: 0644]
gio/gsubprocess.h [new file with mode: 0644]
gio/gsubprocesslauncher-private.h [new file with mode: 0644]
gio/gsubprocesslauncher.c [new file with mode: 0644]
gio/gsubprocesslauncher.h [new file with mode: 0644]
gio/tests/.gitignore
gio/tests/Makefile.am
gio/tests/gsubprocess-testprog.c [new file with mode: 0644]
gio/tests/gsubprocess.c [new file with mode: 0644]