(get_mapping): Use MSG_CMSG_CLOEXEC for descriptor received from nscd.
authordrepper <drepper>
Sat, 21 Jul 2007 17:24:34 +0000 (17:24 +0000)
committerdrepper <drepper>
Sat, 21 Jul 2007 17:24:34 +0000 (17:24 +0000)
nscd/nscd_helper.c

index 79644a4..50146a0 100644 (file)
@@ -265,7 +265,11 @@ get_mapping (request_type type, const char *key,
   if (wait_on_socket (sock) <= 0)
     goto out_close2;
 
-  if (__builtin_expect (TEMP_FAILURE_RETRY (__recvmsg (sock, &msg, 0))
+# ifndef MSG_CMSG_CLOEXEC
+#  define MSG_CMSG_CLOEXEC 0
+# endif
+  if (__builtin_expect (TEMP_FAILURE_RETRY (__recvmsg (sock, &msg,
+                                                      MSG_CMSG_CLOEXEC))
                        != keylen, 0))
     goto out_close2;