Skip to contentSkip to conversation

tty: Line disc gets reset after close

DISCUSSION Ravikiran G Thirumalai 1 participant 1 message Jul 11, 2003

lore
Share & tools
lore
#0 lore raw

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