summaryrefslogtreecommitdiff
path: root/glib/gmain.h
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2012-07-10 11:27:22 -0400
committerColin Walters <walters@verbum.org>2012-07-10 18:03:56 -0400
commitf7abd3ce130ae3a6da8502c2dce8d773d7514464 (patch)
treeeed16ef3cdeb14eca81052e318fe398cd2465848 /glib/gmain.h
parent82d914d808c616d14d489c0272c6d5afc4bfbd5a (diff)
downloadglib-f7abd3ce130ae3a6da8502c2dce8d773d7514464.tar.gz
Add g_spawn_check_exit_status()
Many (if not "almost all") programs that spawn other programs via g_spawn_sync() or the like simply want to check whether or not the child exited successfully, but doing so requires use of platform-specific functionality and there's actually a fair amount of boilerplate involved. This new API will help drain a *lot* of mostly duplicated code in GNOME, from gnome-session to gdm. And we can see that some bits even inside GLib were doing it wrong; for example checking the exit status on Unix, but ignoring it on Windows. https://bugzilla.gnome.org/show_bug.cgi?id=679691
Diffstat (limited to 'glib/gmain.h')
-rw-r--r--glib/gmain.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/glib/gmain.h b/glib/gmain.h
index fadf7fc44..4d4d5043b 100644
--- a/glib/gmain.h
+++ b/glib/gmain.h
@@ -139,11 +139,13 @@ typedef gboolean (*GSourceFunc) (gpointer user_data);
/**
* GChildWatchFunc:
* @pid: the process id of the child process
- * @status: Status information about the child process,
- * see waitpid(2) for more information about this field
+ * @status: Status information about the child process, encoded
+ * in a platform-specific manner
* @user_data: user data passed to g_child_watch_add()
*
- * The type of functions to be called when a child exists.
+ * Prototype of a #GChildWatchSource callback, called when a child
+ * process has exited. To interpret @status, see the documentation
+ * for g_spawn_check_exit_status().
*/
typedef void (*GChildWatchFunc) (GPid pid,
gint status,