From owner-cvs-all Mon May 1 4:47:56 2000 Delivered-To: cvs-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 542) id 13A1537B6D8; Mon, 1 May 2000 04:47:52 -0700 (PDT) Date: Mon, 1 May 2000 04:47:52 -0700 From: "Andrey A. Chernov" To: Bruce Evans Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/kern tty.c Message-ID: <20000501044751.A71671@freebsd.org> References: <20000430112344.A13987@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: ; from bde@zeta.org.au on Mon, May 01, 2000 at 09:22:09PM +1000 Organization: Biomechanoid Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, May 01, 2000 at 09:22:09PM +1000, Bruce Evans wrote: > I didn't completely forget. I didn't notice the problem with dynamically > created ptys. A loop to set all ptys would bogotify the dynamism by > creating them all. Now I add additional t_timeout initializing to ptcopen, so this thing is solved. > I think the correct for all of this is for the timeout to only apply during > exit(). If the close is under process control, then the process should > be responsible for timing it out, and if the process is buggy then you can > kill it. In exit(), we know that the process didn't care very much about > the data being written, so we can use a small timeout (say twice the > normal output time at the current line speed, or a second or two for ptys). Following situation I notice myself not covers by exit() timeout only: TCP connection is dropped leaving shell on pty, biff is on, so every mail comes to this person cause new comsat process hanging forever on ttywrite. Imagine 50 hanging comsats after few hours. It means that not exit() only but ttywrite timeout is useful too. I.e. any operation waiting forever potentially is bug source and really will wait forever causing various upleasant effects. It is nice idea about different timeouts on per-device basis, but you forget about redialing. I.e. pty connection can have output when carrier is dropped and redialing may take 2-3 minutes to make this output completed, so second or two for ptys is too low. -- Andrey A. Chernov http://nagual.pp.ru/~ache/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message