summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-spawn.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-04-06 18:03:03 +0000
committerHavoc Pennington <hp@redhat.com>2003-04-06 18:03:03 +0000
commite45e4382274149ca60c11f068ccca719f3598074 (patch)
tree5fda8d67759828cd7b8e2f1c9a8f4d66f63b737f /dbus/dbus-spawn.c
parent2618e1a973b816ab59422035046111360ab5aa74 (diff)
2003-04-06 Havoc Pennington <hp@pobox.com>
* bus/bus.c (bus_context_new): fix wrong handling of server_data_slot_unref() in the error case. * dbus/dbus-internals.h (_dbus_assert): change so it passes "(condition) != 0" to _dbus_real_assert so that "_dbus_assert (pointer)" doesn't cause a warning * bus/main.c (main): accept --print-address option to print out the message bus address * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this * dbus/dbus-transport.c (_dbus_transport_open): special error for "tmpdir" option to unix: address on client side * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option to unix: address * configure.in (TEST_SOCKET_DIR): locate a temporary directory we can use to create sockets in the test suite. * bus/main.c (signal_handler): on SIGTERM, exit the daemon cleanly. To be used for testing. * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler() * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new): handle trying to call this when there's no servers active
Diffstat (limited to 'dbus/dbus-spawn.c')
-rw-r--r--dbus/dbus-spawn.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/dbus/dbus-spawn.c b/dbus/dbus-spawn.c
index 2273a4e3..87e1ffc2 100644
--- a/dbus/dbus-spawn.c
+++ b/dbus/dbus-spawn.c
@@ -916,9 +916,7 @@ babysit_signal_handler (int signo)
static void
babysit (pid_t grandchild_pid,
int parent_pipe)
-{
- struct sigaction act;
- sigset_t empty_mask;
+{
int sigchld_pipe[2];
/* I thought SIGCHLD would just wake up the poll, but
@@ -933,12 +931,8 @@ babysit (pid_t grandchild_pid,
}
babysit_sigchld_pipe = sigchld_pipe[WRITE_END];
-
- sigemptyset (&empty_mask);
- act.sa_handler = babysit_signal_handler;
- act.sa_mask = empty_mask;
- act.sa_flags = 0;
- sigaction (SIGCHLD, &act, 0);
+
+ _dbus_set_signal_handler (SIGCHLD, babysit_signal_handler);
write_pid (parent_pipe, grandchild_pid);