Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!caen!sol.ctr.columbia.edu!emory!att!ucbvax!dog.ee.lbl.gov!elf.ee.lbl.gov!torek From: torek@elf.ee.lbl.gov (Chris Torek) Newsgroups: comp.unix.programmer Subject: Re: BSD ioctl question Message-ID: <11914@dog.ee.lbl.gov> Date: 9 Apr 91 11:31:25 GMT References: Reply-To: torek@elf.ee.lbl.gov (Chris Torek) Distribution: comp Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 25 X-Local-Date: Tue, 9 Apr 91 04:31:26 PDT In article davis@pacific.mps.ohio-state.edu (John E. Davis) writes: >I [want] to read [an arbitrary 8 bit data] character ... from, say, >file descriptor 2. Raw [mode would work except that it] turns off all >input/output processing. ... I only want input processing turned off. >from within a C program how do I accomplish the above objective? >A related question (perhaps the same question): It seems that from the shell, >I can type `stty -isig' to turn off input processing on the interrupt >characters (^Z, etc..). In BSD, how do I accomplish this with an ioctl? In BSD, you start by reading about termios. If you have `stty -isig' you have POSIX termios. In general, you want CS8 (8 data bits), optional parity, ISIG and ICANON turned off, and OPOST turned on. If you have a BSD system without `stty -isig' and without TIOCGETA etc., you can fake 8-bit input without disabling output processing by setting LLITIN in the `local mode word', CBREAK in the sgtty flags, and also turning off all the special characters (struct tchars, struct ltchars). -- In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 415 486 5427) Berkeley, CA Domain: torek@ee.lbl.gov