From 96c5cc23d6d1e8ecfb6eacee7eaf19efe51e89bc Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 6 Apr 2009 18:54:15 +0200 Subject: [PATCH] server: Use para_sigaction() to install the temporary SIGCHLD handler. --- server.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server.c b/server.c index 1e4caf08..c5c97612 100644 --- a/server.c +++ b/server.c @@ -485,7 +485,7 @@ static void server_init(int argc, char **argv) .check_ambiguity = 0, .print_errors = 1 }; - int afs_socket; + int ret, afs_socket; valid_fd_012(); init_random_seed(); @@ -523,8 +523,9 @@ static void server_init(int argc, char **argv) * forked off. Otherwise, para_server does not notice if afs dies before * the SIGCHLD handler has been installed by init_signal_task() below. */ - if (signal(SIGCHLD, tmp_sigchld_handler) == SIG_ERR) { - PARA_EMERG_LOG("failed to install temporary SIGCHLD handler\n"); + ret = para_sigaction(SIGCHLD, tmp_sigchld_handler); + if (ret < 0) { + PARA_EMERG_LOG("SIGCHLD: %s\n", para_strerror(-ret)); exit(EXIT_FAILURE); } PARA_NOTICE_LOG("initializing the audio file selector\n"); -- 2.39.5