tree-wide: port more code to use send_one_fd() and receive_one_fd()
Also, make it slightly more powerful, by accepting a flags argument, and make it safe for handling if more than one cmsg attribute happens to be attached.
This commit is contained in:
+1
-1
@@ -1291,7 +1291,7 @@ static int setup_kmsg(const char *dest, int kmsg_socket) {
|
||||
|
||||
/* Store away the fd in the socket, so that it stays open as
|
||||
* long as we run the child */
|
||||
r = send_one_fd(kmsg_socket, fd);
|
||||
r = send_one_fd(kmsg_socket, fd, 0);
|
||||
safe_close(fd);
|
||||
|
||||
if (r < 0)
|
||||
|
||||
Reference in New Issue
Block a user