]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
2005-01-30 Ulrich Drepper <drepper@redhat.com>
authorRoland McGrath <roland@gnu.org>
Mon, 18 Jul 2005 03:24:17 +0000 (03:24 +0000)
committerRoland McGrath <roland@gnu.org>
Mon, 18 Jul 2005 03:24:17 +0000 (03:24 +0000)
[BZ #1103]
* nscd/nscd_helper.c (get_mapping): Use MSG_NOSIGNAL if available.
* nscd/connections.c (send_ro_fd): Likewise.

nscd/connections.c
nscd/nscd_helper.c

index b993bf1a320eb45cb3fe6fa32f59b78deb420e49..d4ce2d345e51a853f3f453f1b3b5db4ac058c451 100644 (file)
@@ -619,7 +619,10 @@ send_ro_fd (struct database_dyn *db, char *key, int fd)
 
   /* Send the control message.  We repeat when we are interrupted but
      everything else is ignored.  */
-  (void) TEMP_FAILURE_RETRY (sendmsg (fd, &msg, 0));
+#ifndef MSG_NOSIGNAL
+# define MSG_NOSIGNAL 0
+#endif
+  (void) TEMP_FAILURE_RETRY (sendmsg (fd, &msg, MSG_NOSIGNAL));
 
   if (__builtin_expect (debug_level > 0, 0))
     dbg_log (_("provide access to FD %d, for %s"), db->ro_fd, key);
index 12c10664af3ec6ffbeb2c5f00023ad473ff6b64e..b7f0239a23ecc65d974e5e2a9de9e2e0ab2011e2 100644 (file)
@@ -196,7 +196,10 @@ get_mapping (request_type type, const char *key,
     /* Failure or timeout.  */
     goto out_close2;
 
-  if (TEMP_FAILURE_RETRY (__recvmsg (sock, &msg, 0)) != keylen)
+#ifndef MSG_NOSIGNAL
+# define MSG_NOSIGNAL 0
+#endif
+  if (TEMP_FAILURE_RETRY (__recvmsg (sock, &msg, MSG_NOSIGNAL)) != keylen)
     goto out_close2;
 
   mapfd = *(int *) CMSG_DATA (cmsg);