Return to BSD News archive
Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!constellation!convex!convex!cs.utexas.edu!howland.reston.ans.net!EU.net!news.eunet.fi!news.spb.su!satisfy.kiae.su!kiae!relcom!sable!news-server
From: "Konstantin E. Telegin" <tke@work.sable.krasnoyarsk.su>
Subject: Kermit problems
Reply-To: tke@work.sable.krasnoyarsk.su
Organization: Krasnoyarsk Interurban Telephone and Telegraph Station
Date: Mon, 17 Oct 1994 17:13:13 GMT
Message-ID: <ABf2hek0b6@work>
Lines: 68
Sender: news-server@news.sable.krasnoyarsk.su
Hi,
Couple of days ago I have asked question about
kermit problems. It hangs after
kermit> set line /dev/ttyXX
It still hangs because of CLOCAL flag.
I can't set it and other c_cflags by stty.
If I execute code below flag clocal uppears
untill I finish the programm.
Is this behaviour right?
Why doesn't stty sets clocal ?
Thanks.
********************************************
#include <stdio.h>
#include <termios.h>
#include <sys/file.h>
#include <sys/errno.h>
void main(argc, argv)
int argc; char **argv;
{
struct termios t;
int fd, error;
int c_cflags;
if( (fd=open(argv[1],O_RDONLY | O_NONBLOCK)) < 0)
printf("\nError: can't open file %s\n",argv[1]);
if (tcgetattr(fd, &t)<0)
printf("\nERROR: %s",strerror(errno));
printf("\n Before setting : %x", t.c_cflag );
t.c_cflag |= CLOCAL;
printf("\n After preparing : %x", t.c_cflag );
if (tcsetattr(fd,TCSANOW,&t)<0)
printf("\nERROR: %s",strerror(errno));
if (tcgetattr(fd, &t)<0)
printf("\nERROR: %s ",strerror(errno));
printf("\n After setting : %x", t.c_cflag );
getchar();
close(fd);
}
******************************************************************
---
Telegin K.E. The Krasnoyarsk Interurban Telephone
<tke@sable.krasnoyarsk.su> and Telegraph Station.