Fix handling of sessiond respawn after a SIGKILL
[lttng-tools.git] / liblttsessiondcomm / liblttsessiondcomm.c
index 253e63545addf17710baeecc679d37fa05d11aae..e7e4204339d61dc0b1daa97cdadd3b1c6fd8033c 100644 (file)
@@ -186,6 +186,8 @@ int lttcomm_create_unix_sock(const char *pathname)
        sun.sun_family = AF_UNIX;
        strncpy(sun.sun_path, pathname, strlen(pathname));
 
+       /* Unlink the old file if present */
+       (void) unlink(pathname);
        ret = bind(fd, (struct sockaddr *) &sun, sizeof(sun));
        if (ret < 0) {
                perror("bind");
@@ -299,8 +301,8 @@ ssize_t lttcomm_send_fds_unix_sock(int sock, void *buf, int *fds, size_t nb_fd,
        char tmp[CMSG_SPACE(sizeof_fds)];
 
        /*
-        * Note: the consumerd receiver only supports receiving one FD at a
-        * time for now.
+        * Note: the consumerd receiver only supports receiving one FD per
+        * message.
         */
        assert(nb_fd == 1);
 
This page took 0.023126 seconds and 4 git commands to generate.