mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
GDBusConnection: don't write to stdout
When losing the D-Bus connection, we would write to stdout about it just before killing ourselves with SIGTERM. We're a library, so we should probably use stderr instead. https://bugzilla.gnome.org/show_bug.cgi?id=721324
This commit is contained in:
parent
8976175ba9
commit
51b3dd7332
@ -799,14 +799,14 @@ g_dbus_connection_real_closed (GDBusConnection *connection,
|
||||
{
|
||||
if (error != NULL)
|
||||
{
|
||||
g_print ("%s: Remote peer vanished with error: %s (%s, %d). Exiting.\n",
|
||||
g_printerr ("%s: Remote peer vanished with error: %s (%s, %d). Exiting.\n",
|
||||
G_STRFUNC,
|
||||
error->message,
|
||||
g_quark_to_string (error->domain), error->code);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_print ("%s: Remote peer vanished. Exiting.\n", G_STRFUNC);
|
||||
g_printerr ("%s: Remote peer vanished. Exiting.\n", G_STRFUNC);
|
||||
}
|
||||
raise (SIGTERM);
|
||||
}
|
||||
|
@ -191,12 +191,12 @@ test_exit_on_close (gconstpointer test_data)
|
||||
if (td->exit_on_close == EXPLICITLY_FALSE ||
|
||||
td->who_closes == LOCAL)
|
||||
{
|
||||
g_test_trap_assert_stdout_unmatched (VANISHED_PATTERN);
|
||||
g_test_trap_assert_stderr_unmatched (VANISHED_PATTERN);
|
||||
g_test_trap_assert_passed ();
|
||||
}
|
||||
else
|
||||
{
|
||||
g_test_trap_assert_stdout (VANISHED_PATTERN);
|
||||
g_test_trap_assert_stderr (VANISHED_PATTERN);
|
||||
g_test_trap_assert_failed();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user