Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!hsdndev!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.unix.questions Subject: Re: tty 8-bit output Message-ID: <14960@smoke.brl.mil> Date: 24 Jan 91 00:54:14 GMT References: <1991Jan22.175816.12228@athena.mit.edu> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 18 In article <1991Jan22.175816.12228@athena.mit.edu> ckclark@athena.mit.edu (Calvin Clark) writes: >Ok, I give up. I am using the "new" Berkeley tty driver, >as described in tty(4). It is reasonably easy to get it >to accept eight-bit input, by using 'stty pass8' or by >setting the ioctl correctly. However, it seems that if >it is set in a mode which does *any* output processing >at all, (i.e., anything but 'raw' or 'litout'), it >will strip the eighth bit off of the output characters. There was a bug in the BSD tty handler that made it hard to get 8-bit raw data through the handler. However, the right combination of set/get/set ioctls can work around the bug. stty( ofd, &ttyb ); ioctl( ofd, TIOCLSET, &lflags ); /* following 4.2BSD hack courtesy of Chris Torek */ gtty( ofd, &ttyb ); ioctl( ofd, TIOCSETN, &ttyb ); /* makes LLITOUT stick */