summaryrefslogtreecommitdiff
path: root/usr.sbin/mrouted/rsrr.c
diff options
context:
space:
mode:
authorBill Fenner <fenner@FreeBSD.org>1996-11-11 03:50:15 +0000
committerBill Fenner <fenner@FreeBSD.org>1996-11-11 03:50:15 +0000
commitf014b7e69bbd6737e73d43099fdb4ba32e99b5ad (patch)
tree165f9cfd99d55b06f466b5dad237613485ce8624 /usr.sbin/mrouted/rsrr.c
parentf29c770b37549c04aba8981e60954c3878a59bd8 (diff)
downloadsrc-test2-f014b7e69bbd6737e73d43099fdb4ba32e99b5ad.tar.gz
src-test2-f014b7e69bbd6737e73d43099fdb4ba32e99b5ad.zip
Notes
Diffstat (limited to 'usr.sbin/mrouted/rsrr.c')
-rw-r--r--usr.sbin/mrouted/rsrr.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/usr.sbin/mrouted/rsrr.c b/usr.sbin/mrouted/rsrr.c
index ea9628f55aea..b447f1a0b8fe 100644
--- a/usr.sbin/mrouted/rsrr.c
+++ b/usr.sbin/mrouted/rsrr.c
@@ -112,7 +112,11 @@ rsrr_read(f, rfd)
fd_set *rfd;
{
register int rsrr_recvlen;
+#ifdef SYSV
+ sigset_t block, oblock;
+#else
register int omask;
+#endif
bzero((char *) &client_addr, sizeof(client_addr));
rsrr_recvlen = recvfrom(rsrr_socket, rsrr_recv_buf, sizeof(rsrr_recv_buf),
@@ -122,10 +126,21 @@ rsrr_read(f, rfd)
log(LOG_ERR, errno, "RSRR recvfrom");
return;
}
+#ifdef SYSV
+ (void)sigemptyset(&block);
+ (void)sigaddset(&block, SIGALRM);
+ if (sigprocmask(SIG_BLOCK, &block, &oblock) < 0)
+ log(LOG_ERR, errno, "sigprocmask");
+#else
/* Use of omask taken from main() */
omask = sigblock(sigmask(SIGALRM));
+#endif
rsrr_accept(rsrr_recvlen);
+#ifdef SYSV
+ (void)sigprocmask(SIG_SETMASK, &oblock, (sigset_t *)NULL);
+#else
(void)sigsetmask(omask);
+#endif
}
/* Accept a message from the reservation protocol and take