summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-12-03 17:43:31 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2013-10-23 17:41:36 +0100
commit8b8bbe4c8b4693681e8c5d45431d1798091f4bdc (patch)
tree6282bfca9add398b2bfd6fab00c88c685b35cfb3
parent33fcec4a47bfa9365a7004d00e308f05720d96cd (diff)
downloaddbus-8b8bbe4c8b4693681e8c5d45431d1798091f4bdc.tar.gz
dbus-spawn: correct a comment that falsely claimed thread-safety
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=60859 Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
-rw-r--r--dbus/dbus-spawn.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/dbus/dbus-spawn.c b/dbus/dbus-spawn.c
index bd7aaf80..7c46935a 100644
--- a/dbus/dbus-spawn.c
+++ b/dbus/dbus-spawn.c
@@ -810,9 +810,14 @@ handle_watch (DBusWatch *watch,
#define WRITE_END 1
-/* Avoids a danger in threaded situations (calling close()
- * on a file descriptor twice, and another thread has
- * re-opened it since the first close)
+/* Avoids a danger in re-entrant situations (calling close()
+ * on a file descriptor twice, and another module has
+ * re-opened it since the first close).
+ *
+ * This previously claimed to be relevant for threaded situations, but by
+ * trivial inspection, it is not thread-safe. It doesn't actually
+ * matter, since this module is only used in the -util variant of the
+ * library, which is only used in single-threaded situations.
*/
static int
close_and_invalidate (int *fd)