summaryrefslogtreecommitdiff
path: root/usr.bin/telnet/sys_bsd.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2001-09-04 23:36:00 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2001-09-04 23:36:00 +0000
commit6e69b2a3e9a34411460d33a432a805b3eb1924d1 (patch)
tree33cfe52f5da9645a00ca15af49ceefdd612696d2 /usr.bin/telnet/sys_bsd.c
parent102264589c8731b5f0fb00b204e5963726ecec83 (diff)
Replace the deprecated BSD sigsetmask/sigblock/sigpause functions with their POSIX counterparts.
Diffstat (limited to 'usr.bin/telnet/sys_bsd.c')
-rw-r--r--usr.bin/telnet/sys_bsd.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.bin/telnet/sys_bsd.c b/usr.bin/telnet/sys_bsd.c
index ba105592dad..f7a9f14281b 100644
--- a/usr.bin/telnet/sys_bsd.c
+++ b/usr.bin/telnet/sys_bsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sys_bsd.c,v 1.8 2000/10/10 15:41:10 millert Exp $ */
+/* $OpenBSD: sys_bsd.c,v 1.9 2001/09/04 23:35:59 millert Exp $ */
/* $NetBSD: sys_bsd.c,v 1.11 1996/02/28 21:04:10 thorpej Exp $ */
/*
@@ -636,6 +636,9 @@ TerminalNewMode(f)
tc.t_brkc = esc;
#endif
} else {
+#ifdef SIGTSTP
+ sigset_t mask;
+#endif /* SIGTSTP */
#ifdef SIGINFO
void ayt_status();
@@ -643,11 +646,9 @@ TerminalNewMode(f)
#endif
#ifdef SIGTSTP
(void) signal(SIGTSTP, SIG_DFL);
-# ifndef SOLARIS
- (void) sigsetmask(sigblock(0) & ~(1<<(SIGTSTP-1)));
-# else SOLARIS
- (void) sigrelse(SIGTSTP);
-# endif SOLARIS
+ sigemptyset(&mask);
+ sigaddset(&mask, SIGTSTP);
+ sigprocmask(SIG_UNBLOCK, &mask, NULL);
#endif /* SIGTSTP */
#ifndef USE_TERMIO
ltc = oltc;