diff options
author | Havoc Pennington <hp@redhat.com> | 2003-04-11 03:05:58 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2003-04-11 03:05:58 +0000 |
commit | eb63ba5039c8afe61210cf2b217ec75b4a86356e (patch) | |
tree | c8e10a3d1c552f9fb46fea088a5b5f5b930db941 /dbus/dbus-internals.c | |
parent | 6be547d32f018c23ba56426a0bccd08baa2cf440 (diff) |
2003-04-10 Havoc Pennington <hp@pobox.com>
* dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
the possible parent failures before we fork, so that we don't
fail to create a babysitter after creating the child.
* bus/activation.c (bus_activation_activate_service): kill child
if we don't successfully complete the activation.
Diffstat (limited to 'dbus/dbus-internals.c')
-rw-r--r-- | dbus/dbus-internals.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/dbus/dbus-internals.c b/dbus/dbus-internals.c index 230c8efe..30f47f00 100644 --- a/dbus/dbus-internals.c +++ b/dbus/dbus-internals.c @@ -174,6 +174,8 @@ _dbus_warn (const char *format, va_end (args); } +static dbus_bool_t verbose_initted = FALSE; + /** * Prints a warning message to stderr * if the user has enabled verbose mode. @@ -188,7 +190,6 @@ _dbus_verbose_real (const char *format, { va_list args; static dbus_bool_t verbose = TRUE; - static dbus_bool_t initted = FALSE; static unsigned long pid; /* things are written a bit oddly here so that @@ -198,11 +199,11 @@ _dbus_verbose_real (const char *format, if (!verbose) return; - if (!initted) + if (!verbose_initted) { verbose = _dbus_getenv ("DBUS_VERBOSE") != NULL; pid = _dbus_getpid (); - initted = TRUE; + verbose_initted = TRUE; if (!verbose) return; } @@ -215,6 +216,18 @@ _dbus_verbose_real (const char *format, } /** + * Reinitializes the verbose logging code, used + * as a hack in dbus-spawn.c so that a child + * process re-reads its pid + * + */ +void +_dbus_verbose_reset_real (void) +{ + verbose_initted = FALSE; +} + +/** * Duplicates a string. Result must be freed with * dbus_free(). Returns #NULL if memory allocation fails. * If the string to be duplicated is #NULL, returns #NULL. |