Patch to remove parity on output?

Steinar Haug sthaug at idt.unit.no
Tue Feb 6 11:11:21 AEST 1990


Short version: I need a patch to make 'stty cs8 -parenb' permanent.

Longer version:

The problems with 7bit plus parity versus 8 bit for terminal input and
output have been discussed a number of times on Sun-Spots. As far as I can
see, no good solution has been found yet; maybe it'll be in 4.1?
Meanwhile, I have a more immediate and maybe simpler problem: I need to
generate output without parity.

The reason is that we have a heterogeneous environment, with computers
from several vendors. And *all* of them operate happily on 8 bit/no
parity, except our Suns. Input is no problem, SunOS will gladly ignore
parity or the lack of it. Output is the problem: The current, highly
unsatisfactory situation is that users have to reset their terminals from
8bit/none to 7bit/even when logging in to a Sun. (If they don't change
their terminals, the parity generated from the Suns shows up on the
terminals in the form of characters from an extended 256-char graphic set
- definitely not what the users want!)

I can set 'stty cs8 -parenb', which is fine until I use 'more'.. or
'rlogin'.. or any number of programs which like to manipulate terminal
settings. As soon as I use one of these, boom. Back to 7bit/even. I've
made a guess as to why: These programs (at least the versions on uunet)
use the old TIOCGETP/TIOCSETP ioctls, and the mode flags in the sgttyb
struct don't cater for the 8bit/none case.

So now I'm thinking of a more radical solution: Patch the SunOS kernel so
that it will *never*, ever, under any circumstance, generate parity on
output. This would be quite acceptable as a permanent solution for us,
even if it meant that parity generation could not be turned on by users or
programs. In short, I would like to make 'stty cs8 -parenb' permanent.

Can anyone out there tell me if this solution is feasible? And more
important, where to patch? We're running 4.0.3. And we don't have SunOS
source code.

Thanks for listening!

Steinar Haug, System Administrator
ELAB-RUNIT, University of Trondheim, Norway
Email: sthaug at idt.unit.no



More information about the Comp.sys.sun mailing list