summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-internals.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-04-09 20:31:21 +0000
committerHavoc Pennington <hp@redhat.com>2003-04-09 20:31:21 +0000
commit1708094c0e00ab433bb0a51981f8b77d24aee256 (patch)
treee30c5ca0f6011bb3f1a083b8a9b49ee778da0cbd /dbus/dbus-internals.c
parent0e1945b3889f8be8e31e39ad2b982c8a192be41d (diff)
2003-04-09 Havoc Pennington <hp@redhat.com>
* dbus/dbus-bus.c (dbus_bus_register): fix up error handling and a memory leak * bus/dispatch.c (check_service_activated): fix bug in test * dbus/dbus-mainloop.c (check_timeout): fix this up * dbus/dbus-internals.c (_dbus_verbose_real): include PID in verbose output so we can sort out output from different processes, e.g. in the activation case.
Diffstat (limited to 'dbus/dbus-internals.c')
-rw-r--r--dbus/dbus-internals.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/dbus/dbus-internals.c b/dbus/dbus-internals.c
index de98c1fc..6a662e5d 100644
--- a/dbus/dbus-internals.c
+++ b/dbus/dbus-internals.c
@@ -189,7 +189,8 @@ _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
* in the non-verbose case we just have the one
* conditional and return immediately.
@@ -200,10 +201,13 @@ _dbus_verbose_real (const char *format,
if (!initted)
{
verbose = _dbus_getenv ("DBUS_VERBOSE") != NULL;
+ pid = _dbus_getpid ();
initted = TRUE;
if (!verbose)
return;
}
+
+ fprintf (stderr, "%lu: ", pid);
va_start (args, format);
vfprintf (stderr, format, args);