From owner-cvs-usrsbin Tue Sep 23 16:08:41 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id QAA11548 for cvs-usrsbin-outgoing; Tue, 23 Sep 1997 16:08:41 -0700 (PDT) Received: from awfulhak.demon.co.uk (awfulhak.demon.co.uk [158.152.17.1]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id QAA11490; Tue, 23 Sep 1997 16:08:11 -0700 (PDT) Received: from gate.lan.awfulhak.org (localhost [127.0.0.1]) by awfulhak.demon.co.uk (8.8.5/8.8.5) with ESMTP id AAA07852; Wed, 24 Sep 1997 00:06:35 +0100 (BST) Message-Id: <199709232306.AAA07852@awfulhak.demon.co.uk> X-Mailer: exmh version 2.0zeta 7/24/97 To: =?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?= cc: Brian Somers , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-usrsbin@FreeBSD.ORG Subject: Re: cvs commit: src/usr.sbin/ppp modem.c In-reply-to: Your message of "Wed, 24 Sep 1997 02:29:11 +0400." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 24 Sep 1997 00:06:34 +0100 From: Brian Somers Sender: owner-cvs-usrsbin@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > On Tue, 23 Sep 1997, Brian Somers wrote: > > > brian 1997/09/23 15:09:46 PDT > > > > Modified files: (Branch: RELENG_2_2) > > usr.sbin/ppp modem.c > > Log: > > MFC: Don't use uu_lock in -direct mode. It conflicts w/ > > hylafax & the like. > > Early or later you'll return to model I describe: treat -direct as > stdin/stdout only without any additional assumptions :-) > > It seems that hylafax lock modem before open (like any soft who open > modem). Moreover some soft can use its own tty modes for opened modem > which ppp may spam by CLOCAL set. Imagine f.e. that some upper level soft > open device as controlling terminal (assuming he got HUP or -1 from it > on carrier drop) then pass descriptor to ppp stdin. ppp spams tty modes > by its own CLOCAL, causing upper level soft never got HUP. > > I think ppp must not touch tty flags of passed descriptor as possible. > F.e. setting RAW mode is acceptable thing, but setting/removing HUP > handling is not acceptable. Then use both HUP catch function and TIOCM_CD > to handle carrier with fallback to carrier_always_ON if TIOCM_CD returns > -1. But in this case, surely ppp would never get anything from the modem - select() would never see anything as reading or writing to the modem would give a SIGTTIN or SIGTTOU. And if the parent isn't active, it wouldn't get the HUP anyway. If anyone can show me a practical, real-live situation where checking for carrier won't work and leaving -clocal and waiting for a HUP will, I'll modify the code. 'Till then, I'd rather leave it as it is. It'll make my eventual integration of Archie's mpd easier. > -- > Andrey A. Chernov > > http://www.nagual.pp.ru/~ache/ > -- Brian , , Don't _EVER_ lose your sense of humour....