Fix: remove debugging print() call from Python agent
[lttng-ust.git] / liblttng-ust-comm / lttng-ust-comm.c
index 631ff42f0862ea027bd980b24dfbd041bc5bba8e..d213770f7a25f69059810d14d5f12569636cba2b 100644 (file)
@@ -377,6 +377,8 @@ ssize_t ustcomm_send_fds_unix_sock(int sock, int *fds, size_t nb_fd)
        msg.msg_controllen = CMSG_LEN(sizeof_fds);
 
        cmptr = CMSG_FIRSTHDR(&msg);
+       if (!cmptr)
+               return -EINVAL;
        cmptr->cmsg_level = SOL_SOCKET;
        cmptr->cmsg_type = SCM_RIGHTS;
        cmptr->cmsg_len = CMSG_LEN(sizeof_fds);
@@ -390,7 +392,7 @@ ssize_t ustcomm_send_fds_unix_sock(int sock, int *fds, size_t nb_fd)
        msg.msg_iovlen = 1;
 
        do {
-               ret = sendmsg(sock, &msg, 0);
+               ret = sendmsg(sock, &msg, MSG_NOSIGNAL);
        } while (ret < 0 && errno == EINTR);
        if (ret < 0) {
                /*
This page took 0.044203 seconds and 4 git commands to generate.