From c07eccd9c212e1e1642ee8cd359f5066ee8e5295 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 3 Dec 2013 08:27:05 +0000 Subject: [PATCH] gtestdbus: Add a note about thread safety to the documentation https://bugzilla.gnome.org/show_bug.cgi?id=712148 --- gio/gtestdbus.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gio/gtestdbus.c b/gio/gtestdbus.c index ea1968317..a7410ac48 100644 --- a/gio/gtestdbus.c +++ b/gio/gtestdbus.c @@ -323,6 +323,12 @@ _g_test_watcher_remove_pid (GPid pid) * A helper class for testing code which uses D-Bus without touching the user's * session bus. * + * Note that #GTestDBus modifies the user’s environment, calling setenv(). This + * is not thread-safe, so all #GTestDBus calls should be completed before + * threads are spawned, or should have appropriate locking to ensure no access + * conflicts to environment variables shared between #GTestDBus and other + * threads. + * * * Creating unit tests using GTestDBus *