From owner-freebsd-questions@FreeBSD.ORG Tue Mar 6 21:54:29 2007 Return-Path: X-Original-To: freebsd-questions@FreeBSD.org Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B516A16A405 for ; Tue, 6 Mar 2007 21:54:29 +0000 (UTC) (envelope-from dan@more.net) Received: from jane.spg.more.net (jane.spg.more.net [207.160.133.140]) by mx1.freebsd.org (Postfix) with ESMTP id 3BD5C13C491 for ; Tue, 6 Mar 2007 21:54:28 +0000 (UTC) (envelope-from dan@more.net) Received: from [127.0.0.1] (localhost [127.0.0.1]) by jane.spg.more.net (Postfix) with ESMTP id 8DD489C10F for ; Tue, 6 Mar 2007 15:54:32 -0600 (CST) From: Dan D Niles To: freebsd-questions@FreeBSD.org In-Reply-To: <1172784439.14922.47.camel@jane.spg.more.net> References: <1172784439.14922.47.camel@jane.spg.more.net> Content-Type: text/plain Date: Tue, 06 Mar 2007 15:54:32 -0600 Message-Id: <1173218072.5629.3.camel@jane.spg.more.net> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit Cc: Subject: Re: Serial Port Problems (Solved) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2007 21:54:29 -0000 On Thu, 2007-03-01 at 15:27 -0600, Dan D Niles wrote: > If I disconnect and come back later > (sometimes), or if I hit return without entering a login name (always) > it starts spitting out junk like: > > nooo~:Woo{;>6(|uww~now~nou})|t}}t9- I found a solution, although I'm not sure why it works. When you just hit enter getty goes back to the beginning of its loop. This also happens if you enter a name starting with "-" or consisting of just spaces. These also causes the output to become garbled. At the beginning of the loop it calls setttymode(0). If I insert a sleep(1) before this call, everything works correctly. If I insert the sleep after that, the output still gets garbled. Like I said, I don't know why it works, but it does. I don't think a short delay is unreasonable after entering invalid or no information. I am going to submit a PR with a patch. Dan