From 6e69b2a3e9a34411460d33a432a805b3eb1924d1 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 4 Sep 2001 23:36:00 +0000 Subject: Replace the deprecated BSD sigsetmask/sigblock/sigpause functions with their POSIX counterparts. --- usr.bin/telnet/sys_bsd.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'usr.bin/telnet/sys_bsd.c') 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; -- cgit v1.2.3