From 5d9ad98c7aba8af69a5fed8f6b0a51e71bc98e71 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 18 Jul 2005 03:24:17 +0000 Subject: [PATCH] 2005-01-30 Ulrich Drepper [BZ #1103] * nscd/nscd_helper.c (get_mapping): Use MSG_NOSIGNAL if available. * nscd/connections.c (send_ro_fd): Likewise. --- nscd/connections.c | 5 ++++- nscd/nscd_helper.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/nscd/connections.c b/nscd/connections.c index b993bf1a320..d4ce2d345e5 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 12c10664af3..b7f0239a23e 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); -- 2.47.2