dbus/dbus-spawn-win.c: implement missing _dbus_babysitter_get_child_exit_status ...
authorTor Lillqvist <tml@iki.fi>
Wed, 22 Apr 2009 08:11:27 +0000 (10:11 +0200)
committerRalf Habacker <ralf.habacker@freenet.de>
Mon, 30 Nov 2009 12:14:18 +0000 (13:14 +0100)
dbus/dbus-spawn-win.c

index de07789..2d58a12 100644 (file)
@@ -268,6 +268,22 @@ _dbus_babysitter_get_child_exited (DBusBabysitter *sitter)
   return (sitter->child_handle == NULL);
 }
 
+dbus_bool_t
+_dbus_babysitter_get_child_exit_status (DBusBabysitter *sitter,
+                                        int            *status)
+{
+  PING();
+
+  if (!_dbus_babysitter_get_child_exited (sitter))
+    _dbus_assert_not_reached ("Child has not exited");
+  
+  if (!sitter->have_child_status)
+    return FALSE;
+
+  *status = sitter->child_status;
+  return TRUE;
+}
+
 /**
  * Gets the exit status of the child. We do this so implementation specific
  * detail is not cluttering up dbus, for example the system launcher code.