2003-07-11 09:12:43

by Ravikiran G Thirumalai

[permalink] [raw]
Subject: tty: Line disc gets reset after close

On a rs232 serial port, If i try
# stty -F /dev/ttyS0 line 2
and then execute
# stty -F /dev/ttyS0 -a
line disc was shown as line = 0. Further investigation showed that
close on the tty fd and subsequent open to it resets the line disc to 0.

My question is, is this the expected behaviour?
If change flags like icanon, it remains inspite of close and opens. I'd
expect ldisc to remain that way too.

Thanks,
Kiran