summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1995-10-23 12:59:29 +0000
committerpeter <peter@FreeBSD.org>1995-10-23 12:59:29 +0000
commit40bae56a152f8ffa6b4aadc6cf9049af280f1362 (patch)
tree5f7c6ddbef5106e09708939da22d25193e72359f
parent04268c7f68fff30977b4b06417159a9a191cfccf (diff)
downloadFreeBSD-src-40bae56a152f8ffa6b4aadc6cf9049af280f1362.zip
FreeBSD-src-40bae56a152f8ffa6b4aadc6cf9049af280f1362.tar.gz
merge beta26 import conflicts
-rw-r--r--usr.sbin/nslookup/subr.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/usr.sbin/nslookup/subr.c b/usr.sbin/nslookup/subr.c
index d7cca0e..7fcf25b 100644
--- a/usr.sbin/nslookup/subr.c
+++ b/usr.sbin/nslookup/subr.c
@@ -55,7 +55,7 @@
#ifndef lint
static char sccsid[] = "@(#)subr.c 5.24 (Berkeley) 3/2/91";
-static char rcsid[] = "$Id: subr.c,v 1.3 1995/05/30 03:49:20 rgrimes Exp $";
+static char rcsid[] = "$Id: subr.c,v 1.4 1995/08/20 22:32:50 peter Exp $";
#endif /* not lint */
/*
@@ -177,12 +177,22 @@ Malloc(size)
}
#endif
#else
+#ifdef POSIX_SIGNALS
+ { sigset_t sset;
+ sigemptyset(&sset);
+ sigaddset(&sset,SIGINT);
+ sigprocmask(SIG_BLOCK,&sset,NULL);
+ ptr = malloc((unsigned) size);
+ sigprocmask(SIG_UNBLOCK,&sset,NULL);
+ }
+#else
{ int saveMask;
saveMask = sigblock(sigmask(SIGINT));
ptr = malloc((unsigned) size);
(void) sigsetmask(saveMask);
}
#endif
+#endif
if (ptr == NULL) {
fflush(stdout);
fprintf(stderr, "*** Can't allocate memory\n");
OpenPOWER on IntegriCloud