Fix handling of sessiond respawn after a SIGKILL
[lttng-tools.git] / liblttsessiondcomm / liblttsessiondcomm.c
index 9313a34c5d57eba26190e0b07075dea2d7c1ab1b..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");
This page took 0.023057 seconds and 4 git commands to generate.