*BSD News Article 32258


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!yarrina.connect.com.au!warrane.connect.com.au!kralizec.zeta.org.au!not-for-mail
From: bde@kralizec.zeta.org.au (Bruce Evans)
Newsgroups: comp.os.386bsd.questions
Subject: Re: cu doesn't work, kermit hangs
Date: 1 Jul 1994 14:42:30 +1000
Organization: Kralizec Dialup Unix Sydney - +61-2-837-1183, v.32bis v.42bis
Lines: 60
Message-ID: <2v06rm$c5b@kralizec.zeta.org.au>
References: <2upqsr$5ab@panix.com> <2uqs4d$ofb@Venus.mcs.com> <2uv7a1$ier@panix.com> <2uvap8$ecn@venus.mcs.com>
NNTP-Posting-Host: kralizec.zeta.org.au

In article <2uvap8$ecn@venus.mcs.com>, Daniel Leeds <dleeds@MCS.COM> wrote:
>Walter Polkosnik (banana@panix.com) wrote:
>
>: What FM? I didn't see this anywhere.
>
>Try the FAQ.  Its in there and has been for quite some time.
>
>: : $stty -f /dev/tty0x clocal

I hope it doesn't stay there much longer.  In 1.1R, this hack only works
on /dev/tty0x.  -clocal is implicit for the first open of /dev/ttydx
and +clocal is implicit for the first open of /dev/cua0x.  In 1.1.5R,
the hack doesn't work at all (actually it applies to the initial-state
ports which are used to program the settings for the first opens of
real ports).  Correct programs must not assume any particular settings.

>: OK. But how do I fix it for real?
>
>Try putting the above line in rc.local......not to hard to figure out.

Not a real fix either.  kermit attempts to handle clocal itself, but it 
gets tangled up in its own ifdefs.

Try the following (untested) fix.

*** ckutio.c~	Fri Jul  1 14:18:04 1994
--- ckutio.c	Fri Jul  1 14:21:34 1994
***************
*** 1588,1601 ****
  	 * or you have a carrier, otherwise you wouldn't be running this.
  	 */
  #ifdef ATTSV
- #ifdef BSD44
- 	tcsetattr(ttyfd, TCSADRAIN, &ttraw);
- #else
  	if (xlocal) {
  	    ttraw.c_cflag |= CLOCAL;
  	    ioctl(ttyfd, TCSETA, &ttraw);
  	}
- #endif /* BSD44 */
  #endif /* ATTSV */
  #ifndef NOCOTFMC /* = NO Close(Open()) To Force Mode Change */
  /* Reportedly lets uugetty grab the device in SCO UNIX 3.2 / XENIX 2.3 */
--- 1588,1601 ----
  	 * or you have a carrier, otherwise you wouldn't be running this.
  	 */
  #ifdef ATTSV
  	if (xlocal) {
  	    ttraw.c_cflag |= CLOCAL;
+ #ifdef BSD44ORPOSIX
+ 	    tcsetattr(ttyfd, TCSADRAIN, &ttraw);
+ #else
  	    ioctl(ttyfd, TCSETA, &ttraw);
+ #endif /* BSD44ORPOSIX */
  	}
  #endif /* ATTSV */
  #ifndef NOCOTFMC /* = NO Close(Open()) To Force Mode Change */
  /* Reportedly lets uugetty grab the device in SCO UNIX 3.2 / XENIX 2.3 */
-- 
Bruce Evans  bde@kralizec.zeta.org.au