From owner-freebsd-hackers Sat Jul 22 22:37:21 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id WAA20521 for hackers-outgoing; Sat, 22 Jul 1995 22:37:21 -0700 Received: from cs.weber.edu (cs.weber.edu [137.190.16.16]) by freefall.cdrom.com (8.6.11/8.6.6) with SMTP id WAA20513 for ; Sat, 22 Jul 1995 22:37:20 -0700 Received: by cs.weber.edu (4.1/SMI-4.1.1) id AA24940; Sat, 22 Jul 95 23:30:05 MDT From: terry@cs.weber.edu (Terry Lambert) Message-Id: <9507230530.AA24940@cs.weber.edu> Subject: Re: dial up at > 9600 baud To: ache@astral.msk.su (=?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= aka) Date: Sat, 22 Jul 95 23:30:05 MDT Cc: hackers@freebsd.org, jkh@violet.berkeley.edu, bde@zeta.org.au, harry@hgac.com In-Reply-To: from "=?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= aka" at Jul 23, 95 06:59:08 am X-Mailer: ELM [version 2.4dev PL52] Sender: hackers-owner@freebsd.org Precedence: bulk > >PPP always connected at 9600 baud. Found that in getty.c the open() function > >blocks until carrier detected. This happens before the port is set up using > >the getty args. Changed getty to use non-blocking open(), then fall through > >to set up the port with getty args, and then wait for carrier using ioctl() > >similar to slattach. See attached diff file for getty.c in FreeBSD 2.0.5. > > I don't think, that waiting for carrier is right way. > Better way will be to open device as non-blocked, > then setup all tty flags (incl. speed), then reopen device > in blocked mode just before reading anything. > > BTW, Bruce, is it possible now to switch to blocked > mode without reopening? No, it's not possible, since we are talking about whether the open flag is set or not for subsequent opens. The reason the ioctl() loses is taht it will prevent bidirection use of the port, with the getty open always having succeeded. I don't think I quite understand why the previous behaviour was a problem in the first place -- perhas the original poster could explain the rationale for his changes a bit better? Terry Lambert terry@cs.weber.edu --- Any opinions in this posting are my own and not those of my present or previous employers.