From owner-freebsd-bugs Fri Oct 11 11:00:04 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id LAA14673 for bugs-outgoing; Fri, 11 Oct 1996 11:00:04 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id LAA14661; Fri, 11 Oct 1996 11:00:03 -0700 (PDT) Resent-Date: Fri, 11 Oct 1996 11:00:03 -0700 (PDT) Resent-Message-Id: <199610111800.LAA14661@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, anderson@hawaii.conterra.com Received: from hawaii.conterra.com (hawaii.conterra.com [206.30.180.3]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id KAA14350 for ; Fri, 11 Oct 1996 10:53:47 -0700 (PDT) Received: (from anderson@localhost) by hawaii.conterra.com (8.7.5/8.6.9) id NAA08025; Fri, 11 Oct 1996 13:47:55 -0400 (EDT) Message-Id: <199610111747.NAA08025@hawaii.conterra.com> Date: Fri, 11 Oct 1996 13:47:55 -0400 (EDT) From: "Stuart R. Anderson" Reply-To: anderson@hawaii.conterra.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/1774: telnet hangup bug Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 1774 >Category: bin >Synopsis: telnet spins when killed before network is closed >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Oct 11 11:00:02 PDT 1996 >Last-Modified: >Originator: Stuart R. Anderson >Organization: Stuart Anderson anderson@conterra.com Conterra Communications >Release: FreeBSD 2.1-STABLE i386 >Environment: Main server runnning ISP business. Pentium/166. >Description: telnet can go into a run-bound loop if it is killed during the shutdown process. telnet keeps going into deadpeer(). >How-To-Repeat: We are using pmwho (a portmaster related utility) to create a web page displaying who is logged in. Pmwho uses telnet to communicate with the Portmaster. When pmwho exits, telnet receives a signal which begins the looping. During the last incident, we managed to get a load avarage of 100+. >Fix: Reset the signal handler to avoid the loop. There is probably one or two other places where this could be placed, but this one works for us. diff -c sys_bsd.c.orig sys_bsd.c *** sys_bsd.c.orig Fri Oct 11 13:33:49 1996 --- sys_bsd.c Fri Oct 11 13:33:59 1996 *************** *** 789,794 **** --- 789,795 ---- NetClose(fd) int fd; { + (void) signal(SIGPIPE, SIG_DFL); return close(fd); } >Audit-Trail: >Unformatted: