dbus-launch: clarify signal handler
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 17 Jan 2017 20:47:16 +0000 (20:47 +0000)
committerSimon McVittie <smcv@collabora.com>
Fri, 7 Apr 2017 11:07:43 +0000 (12:07 +0100)
commit053c48c035ea58a2d602c1be91032319acbfa1d0
tree66be675d99bb2901a95c9bac53574d3ce69ae57c
parent67c3ad422cffdd59a8e1706bcc7f875c54f03314
dbus-launch: clarify signal handler

We only register signal_handler() for the three signals that we want
to handle as "kill dbus-daemon and exit", so there's no point in the
switch. Silence -Wswitch-default by removing it altogether.

The variable name got_fatal_signal and the verbose message are both
misleading, because actually this is a handler for multiple signals,
not just SIGHUP. Rename them to be generic.

Based on part of a patch from Thomas Zimmermann.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98191
tools/dbus-launch.c