From owner-freebsd-current Wed Sep 10 21:50:30 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id VAA26116 for current-outgoing; Wed, 10 Sep 1997 21:50:30 -0700 (PDT) Received: from gw.itfs.nsk.su (gw.itfs.nsk.su [193.124.36.33]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id VAA26111 for ; Wed, 10 Sep 1997 21:50:25 -0700 (PDT) Received: from itfs.UUCP (uucp@localhost) by gw.itfs.nsk.su (8.6.12/8.6.12) with UUCP id LAA22327 for current@freebsd.org; Thu, 11 Sep 1997 11:50:08 +0700 Received: by itfs.nsk.su; Thu, 11 Sep 97 11:42:18 +0700 (NST) Received: (from daemon@localhost) by news.itfs.nsk.su (8.7.5/8.6.12) id LAA05925; Thu, 11 Sep 1997 11:30:21 +0700 (NSD) From: nnd@itfs.nsk.su To: current@freebsd.org Subject: Re: PPP - why set CLOCAL for server ('-direct' mode) ? Date: 11 Sep 1997 04:30:18 GMT Message-ID: <5v7s4q$4ne@news.itfs.nsk.su> References: <199709110238.TAA23795@usr05.primenet.com> Sender: owner-freebsd-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Terry Lambert wrote: > > (from small script setted as as user's shell) > > then it sets 'CLOCAL' flag for modem and > > as a result 'ppp' process does'nt received 'SIGHUP' > > on modem's carrier drop. > > > > What is the purpose of such ('CLOCAL') setting > > in '-direct' mode ? > Without correct use of the partial open hack, and a driver that > supports it, without CLOCAL set, the lack of DCD prevents the > process from communicating with the modem in order to configure > it, since the open hangs until the DCD goes high. > An alternative implementation would have a host open succeed with > an O_NDELAY flag on the open, but not put the fd in async mode. So the problem (with me) is in (my) interpretation of '-direct' mode - I suppose (as mentioned - but not defined - in ppp manual) that in this case 'ppp' works with 'stdin' and 'stdout' and it is not ppp's task to talk with 'modem' (there can be no modem at all on the 'stdin/stdout' ?). But then I must ask myself - if this are general 'stdin/stdout' files - what the hell does 'CLOCAL' means for them ? Now I use a compromise - I've patched my 'ppp' and after that it's behavior is more suitable for my purposes (at least ppp process on my - server - side of a link sees the CD drop and exits). N.Dudorov P.S. Although I have no patches and therefore no rights to criticize - but (;-) man ppp gives no formal definitions for (listed at synopsis line) flags. They are only explained in the appropriate 'usage' sections of manual.