From 48a0b679412f64e70bda2fbe6d61bc39b241d7be Mon Sep 17 00:00:00 2001 From: sheldonh Date: Tue, 5 Feb 2002 15:20:02 +0000 Subject: [PATCH] Don't use non-signal-safe functions (exit(3) in this case) in signal handlers. In this case, use _exit(2) instead, following the call to shutdown(2). This fixes rare telnetd hangs. PR: misc/33672 Submitted by: Umesh Krishnaswamy MFC after: 1 month git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@90242 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- telnetd/sys_term.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telnetd/sys_term.c b/telnetd/sys_term.c index 385655d..419f4fb 100644 --- a/telnetd/sys_term.c +++ b/telnetd/sys_term.c @@ -1327,5 +1327,5 @@ cleanup(int sig __unused) (void)chmod(line, 0666); (void)chown(line, 0, 0); (void) shutdown(net, 2); - exit(1); + _exit(1); }