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 <umesh@juniper.net>
MFC after:	1 month


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@90242 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
This commit is contained in:
sheldonh 2002-02-05 15:20:02 +00:00
parent 415314d0f6
commit 48a0b67941
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}