about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2005-07-18 03:24:17 +0000
committerRoland McGrath <roland@gnu.org>2005-07-18 03:24:17 +0000
commit5d9ad98c7aba8af69a5fed8f6b0a51e71bc98e71 (patch)
treef5fc74874e8e49efb22cd9b3e07eb9a2070d5626
parent6df121eaa3396b50dae79db3c1f1dd4d94956100 (diff)
downloadglibc-5d9ad98c7aba8af69a5fed8f6b0a51e71bc98e71.tar.gz
glibc-5d9ad98c7aba8af69a5fed8f6b0a51e71bc98e71.tar.xz
glibc-5d9ad98c7aba8af69a5fed8f6b0a51e71bc98e71.zip
2005-01-30 Ulrich Drepper <drepper@redhat.com>
	[BZ #1103]
	* nscd/nscd_helper.c (get_mapping): Use MSG_NOSIGNAL if available.
	* nscd/connections.c (send_ro_fd): Likewise.
-rw-r--r--nscd/connections.c5
-rw-r--r--nscd/nscd_helper.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/nscd/connections.c b/nscd/connections.c
index b993bf1a32..d4ce2d345e 100644
--- a/nscd/connections.c
+++ b/nscd/connections.c
@@ -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);
diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c
index 12c10664af..b7f0239a23 100644
--- a/nscd/nscd_helper.c
+++ b/nscd/nscd_helper.c
@@ -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);