From owner-freebsd-current Sun Jun 8 11:23:35 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA06303 for current-outgoing; Sun, 8 Jun 1997 11:23:35 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.50]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id LAA06247 for ; Sun, 8 Jun 1997 11:23:12 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id LAA28291; Sun, 8 Jun 1997 11:17:55 -0700 From: Terry Lambert Message-Id: <199706081817.LAA28291@phaeton.artisoft.com> Subject: Re: sio driver performance To: bde@zeta.org.au (Bruce Evans) Date: Sun, 8 Jun 1997 11:17:55 -0700 (MST) Cc: bde@zeta.org.au, straka@inficad.com, current@FreeBSD.ORG In-Reply-To: <199706070431.OAA28487@godzilla.zeta.org.au> from "Bruce Evans" at Jun 7, 97 02:31:47 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > >I have noticed that the communications work great until I interrupt the > >process on the box which is tranmitting the data. At that point, the box > >which was receiving suddenly elevates to 100% CPU usage (mostly system) as > >if in a polling loop. When I attempt to reestablish the process which is > > Hangup on the tranmitter breaks the connection. There is no way (*) to > get the same connection back - reads on the open fd will return -1/EIO > forever. (Reads should return 0, but there is a minor bug that prevents > this in some cases. POSIX allows either EOF (0) or -1/EIO.) Not to mention that set the device as controlling tty so that you get the SIGHUP. As far as using the "non-standard" method: if you are depending on O_EXCL exclusive open to block other processes attempting to open the port (such as you might do if you did not want to bother with the "lock file" crock), then closing the port is not really an option. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.