return afs_server_socket[0];
}
-__noreturn static void tmp_sigchld_handler(__a_unused int s)
-{
- PARA_EMERG_LOG("caught early SIGCHLD\n");
- exit(EXIT_FAILURE);
-}
-
static void server_init(int argc, char **argv)
{
struct server_cmdline_parser_params params = {
*/
para_sigaction(SIGUSR1, SIG_IGN);
/*
- * We have to install a SIGCHLD handler before the afs process is being
- * forked off. Otherwise, para_server does not notice if afs dies before
- * the SIGCHLD handler has been installed by init_signal_task() below.
+ * We have to block SIGCHLD before the afs process is being forked off.
+ * Otherwise, para_server does not notice if afs dies before the
+ * SIGCHLD handler has been installed for the parent process by
+ * init_signal_task() below.
*/
- para_sigaction(SIGCHLD, tmp_sigchld_handler);
+ para_block_signal(SIGCHLD);
PARA_NOTICE_LOG("initializing the audio file selector\n");
afs_socket = init_afs();
init_signal_task();
+ para_unblock_signal(SIGCHLD);
PARA_NOTICE_LOG("initializing virtual streaming system\n");
init_vss_task(afs_socket);
PARA_NOTICE_LOG("server init complete\n");