*BSD News Article 28562


Return to BSD News archive

Newsgroups: comp.os.386bsd.development
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!pacbell.com!ihnp4.ucsd.edu!usc!howland.reston.ans.net!torn!mcshub!cebnet!mike
From: mike@CEB.McMaster.CA (Mike Anderson)
Subject: Re: vi (elvis) and more dont work on com ports
Message-ID: <1994Mar14.210412.9603@mcshub.dcss.mcmaster.ca>
Sender: usenet@mcshub.dcss.mcmaster.ca
Nntp-Posting-Host: cebnet.ceb.mcmaster.ca
Organization: McMaster University, Hamilton, Ontario, Canada
References: <2ljo9e$2qv@news.iastate.edu> <1994Mar9.081306.505@news.csuohio.edu> <2lmdps$347@nwfocus.wa.com>
Date: Mon, 14 Mar 1994 21:04:12 GMT
Lines: 30


I traced the problem (with elvis and more over tty serial port) to
specific ioctl calls.  I then wrote a simple program that also exhibits
the bug.  Here is a fragment:

struct sgttyb tty;

ioctl(1, TIOCGETP, &tty);
ioctl(1, TIOCSETP, &tty); 

after the second ioctl ( the set) the tty device gets messed up.
It seems that a get followed by a set should not mess up the tty device.
(This program doen't mess up on the PCs VGA console)
I noticed in the kernal code that these ioctls are in a compatibility module
and are being translated into another set set of ioctls.  I suspect this
is where problem lies.

Thanks for the suggestions about stty cs8 -parenb and so forth.  I have tried
the like and will fiddle some more but I think there is a real bug here.

Can anyone report to me that they are actually using a terminal on the
serial ports and using vi(elvis) or more ?

If so what is your configuration(mine is in brackets)
OS: (NetBSD 0.9)
serial port: (com1 (which is the PCs com2))
terminal: (Tek4115 (termcap: 4115))

mike