From owner-freebsd-current Wed Apr 26 17: 1:25 2000 Delivered-To: freebsd-current@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 542) id 2B31A37B72A; Wed, 26 Apr 2000 17:01:23 -0700 (PDT) Date: Wed, 26 Apr 2000 17:01:23 -0700 From: "Andrey A. Chernov" To: Matthew Dillon Cc: current@FreeBSD.ORG Subject: Re: Workaround for hanging on exit: patch for review Message-ID: <20000426170123.A50417@freebsd.org> References: <20000427011402.A7265@nagual.pp.ru> <200004262122.OAA97717@apollo.backplane.com> <20000426150715.A29997@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <20000426150715.A29997@freebsd.org>; from ache@freebsd.org on Wed, Apr 26, 2000 at 03:07:15PM -0700 Organization: Biomechanoid Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > There is a number of places this may occurse and all of them have no timeout > by default. F.e. if some terminal shell hangs in exit's ttywait, comsat > hangs on ttywrite and lots of comsats appearse after several hours. Alternative > solution will be adding > > tp->t_timeout = 180 * hz; > > while initializing tp struct, but it is more radical than I suggest initially. > Any ideas? I mean following patch here: --- tty.c.bak Thu Apr 6 19:20:22 2000 +++ tty.c Thu Apr 27 03:27:42 2000 @@ -218,6 +218,7 @@ SET(tp->t_state, TS_CONNECTED); bzero(&tp->t_winsize, sizeof(tp->t_winsize)); } + tp->t_timeout = 180 * hz; /* XXX don't hang forever */ ttsetwater(tp); splx(s); return (0); -- Andrey A. Chernov http://nagual.pp.ru/~ache/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message