X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Flttng.c;h=bf07c83b76058219e88ceb1c41b41122242252d2;hp=4d2df2deb999832f1d816eefc44ebb441e7ce614;hb=bbd44cae042d871887fb7207c5144f68d47cb3a8;hpb=6a0caa9baf6913eacea486ac84f14ee65c62108b diff --git a/src/bin/lttng/lttng.c b/src/bin/lttng/lttng.c index 4d2df2deb..bf07c83b7 100644 --- a/src/bin/lttng/lttng.c +++ b/src/bin/lttng/lttng.c @@ -38,8 +38,6 @@ static char *progname; int opt_no_sessiond; char *opt_sessiond_path; -pid_t sessiond_pid; -volatile int recv_child_signal; char *opt_relayd_path; @@ -203,26 +201,11 @@ static void clean_exit(int code) */ static void sighandler(int sig) { - int status; - switch (sig) { case SIGTERM: DBG("SIGTERM caught"); clean_exit(EXIT_FAILURE); break; - case SIGCHLD: - DBG("SIGCHLD caught"); - waitpid(sessiond_pid, &status, 0); - recv_child_signal = 1; - /* Indicate that the session daemon died */ - sessiond_pid = 0; - ERR("Session daemon died (exit status %d)", WEXITSTATUS(status)); - break; - case SIGUSR1: - /* Notify is done */ - recv_child_signal = 1; - DBG("SIGUSR1 caught"); - break; default: DBG("Unknown signal %d caught", sig); break; @@ -250,21 +233,12 @@ static int set_signal_handler(void) sa.sa_handler = sighandler; sa.sa_mask = sigset; sa.sa_flags = 0; - if ((ret = sigaction(SIGUSR1, &sa, NULL)) < 0) { - PERROR("sigaction"); - goto end; - } if ((ret = sigaction(SIGTERM, &sa, NULL)) < 0) { PERROR("sigaction"); goto end; } - if ((ret = sigaction(SIGCHLD, &sa, NULL)) < 0) { - PERROR("sigaction"); - goto end; - } - end: return ret; }