relayd: track the health quit pipe with the fd-tracker
[lttng-tools.git] / src / bin / lttng-relayd / health-relayd.c
index 9b4eefcd55f93e7ad6e9e5e018a398b76fc75f5a..8b2febe05c7e55a53f942d2a4e2a22a917acc2c0 100644 (file)
@@ -55,7 +55,7 @@
 static
 char health_unix_sock_path[PATH_MAX];
 
-int health_quit_pipe[2];
+int health_quit_pipe[2] = { -1, -1 };
 
 /*
  * Check if the thread quit pipe was triggered.
@@ -155,7 +155,8 @@ static
 int setup_health_path(void)
 {
        int is_root, ret = 0;
-       char *home_path = NULL, *rundir = NULL, *relayd_path = NULL;
+       const char *home_path = NULL;
+       char *rundir = NULL, *relayd_path = NULL;
 
        ret = parse_health_env();
        if (ret) {
@@ -343,11 +344,6 @@ restart:
                        revents = LTTNG_POLL_GETEV(&events, i);
                        pollfd = LTTNG_POLL_GETFD(&events, i);
 
-                       if (!revents) {
-                               /* No activity for this FD (poll implementation). */
-                               continue;
-                       }
-
                        /* Thread quit pipe has been closed. Killing thread. */
                        ret = check_health_quit_pipe(pollfd, revents);
                        if (ret) {
This page took 0.02558 seconds and 5 git commands to generate.