Update version to v2.7.6
[lttng-tools.git] / src / bin / lttng / lttng.c
index 4d2df2deb999832f1d816eefc44ebb441e7ce614..7e4d03313f7b1e3a8ec15356e09205affbc23e1f 100644 (file)
@@ -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;
 }
@@ -359,6 +333,7 @@ static int parse_args(int argc, char **argv)
                        opt_no_sessiond = 1;
                        break;
                case OPT_SESSION_PATH:
+                       free(opt_sessiond_path);
                        opt_sessiond_path = strdup(optarg);
                        if (!opt_sessiond_path) {
                                ret = -1;
@@ -366,6 +341,7 @@ static int parse_args(int argc, char **argv)
                        }
                        break;
                case OPT_RELAYD_PATH:
+                       free(opt_relayd_path);
                        opt_relayd_path = strdup(optarg);
                        if (!opt_relayd_path) {
                                ret = -1;
This page took 0.024691 seconds and 4 git commands to generate.