How do you Undefine A character in stty?

Martin McCormick martin at
Wed Dec 17 15:31:50 UTC 2008

	I need to ignore EOF characters that might appear on a
serial RS-232 line. In this case, an EOF probably just means
somebody jiggled the plug just the right way and created some
garbage. in stty, many special characters are defined including
eof as Control-D

intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;

I want to make eof look like eol so that any eof is passed as
the read loop I wrote will ignore any toxic characters.

	This is a data logger connected to a RS-232 output on a
telephone switch and all sorts of odd situations have occurred
at various times when technicians are stopping and restarting
the serial board on the switch. I want my logger to just shrug
off eof's and Control-C's and keep on recording.

	Looking at the stty help and man pages didn't tell me
anything I recognized as useful but I may have missed something.

	Trying to stuff undef after eof = doesn't work and
trying a - just set eof to -. The null string either in or out
of "" appears to still leave eof defined to a null.


Martin McCormick WB5AGZ  Stillwater, OK 
Systems Engineer
OSU Information Technology Department Telecommunications Services Group

More information about the ubuntu-users mailing list