summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-01-25 15:47:15 +0000
committerMarcel Holtmann <marcel@holtmann.org>2007-01-25 15:47:15 +0000
commit2dc29f58476b10b1f92e73eddc6c6cb45b645887 (patch)
treefa96039643727c50c4a5637d85f56f17c118b63c
parent1ef7027ba64b447255f494c13c9677babe364254 (diff)
Ignore SIGCHLD and SIGPIPE
-rw-r--r--daemon/echo.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/daemon/echo.c b/daemon/echo.c
index f49387a5..d482ce6d 100644
--- a/daemon/echo.c
+++ b/daemon/echo.c
@@ -178,6 +178,8 @@ static GIOChannel *setup_rfcomm(DBusConnection *conn, uint8_t channel)
g_io_add_watch(io, G_IO_IN, connect_event, conn);
+ g_io_channel_unref(io);
+
return io;
}
@@ -295,6 +297,10 @@ int main(int argc, char *argv[])
sa.sa_handler = sig_hup;
sigaction(SIGHUP, &sa, NULL);
+ sa.sa_handler = SIG_IGN;
+ sigaction(SIGCHLD, &sa, NULL);
+ sigaction(SIGPIPE, &sa, NULL);
+
main_loop = g_main_loop_new(NULL, FALSE);
system_bus = init_dbus(NULL, NULL, NULL);