bus signal_handler: don't use _dbus_warn, and don't pretend to be portable
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 13 Jun 2011 14:59:14 +0000 (15:59 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 13 Jun 2011 14:59:22 +0000 (15:59 +0100)
commitc7ef3ead558e147db03e358ff37f630cac083c07
tree61db817e68cd35bb651e72b2e4b9e8c7d9e5fff0
parent50c81a35a7c692b0e19b4a5d92343267f4a10c06
bus signal_handler: don't use _dbus_warn, and don't pretend to be portable

_dbus_warn isn't async-signal-safe, so that's out. We can use write()
instead; it's POSIX but not ISO C, but then again, so are signals.
Accordingly, guard it with DBUS_UNIX.

dbus-sysdeps-util-win doesn't actually implement _dbus_set_signal_handler
anyway, so not compiling this code on non-Unix seems more honest.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33336
Reviewed-by: Thiago Macieira <thiago@kde.org>
bus/main.c