Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!mit-eddie!genrad!decvax!decwrl!pyramid!prls!mips!quacky!dce From: dce@quacky.UUCP (David Elliott) Newsgroups: comp.unix.wizards Subject: Re: stuff chars Message-ID: <107@quacky.UUCP> Date: Mon, 8-Dec-86 23:29:18 EST Article-I.D.: quacky.107 Posted: Mon Dec 8 23:29:18 1986 Date-Received: Wed, 10-Dec-86 03:45:48 EST References: <19@houligan.UUCP> <2270@sdcsvax.UCSD.EDU> <104@quacky.UUCP> <775@wjvax.wjvax.UUCP> Reply-To: dce@quacky.UUCP (David Elliott) Organization: MIPS Computer Systems, Sunnyvale, CA Lines: 37 In article <775@wjvax.wjvax.UUCP> brett@wjvax.UUCP (Brett Galloway) writes: >In article <104@quacky.UUCP> dce@quacky.UUCP (David Elliott) writes: >> >>I have never found a way to change the handling of signals such that >>input is not flushed. > >I think that you can use ^Y to embed a stop character in a typed-ahead >input stream. >-- I stand corrected, mainly because I didn't state my case correctly. What I meant was that I know of no way to have a program generate a signal that affects a process without flushing the input. (I've been proven wrong...read on.) In the case of ^Z and ^Y, the difference is that ^Z is handled when it comes into the tty input stream, and ^Y is handled when it is to be handed on to the command. In the case of a command that sends itself a signal, a simple experiment shows that input is not flushed: myprompt% csh % sleep 100 suspend <- typeahead pwd <- typeahead %myprompt% /right/here If we take a look at vi, we see that delayed suspend (^Y) is turned off, and (oh my gosh!) the suspend character is mapped to ^Z (try doing a 'stty susp ^T', run vi, and do a :map; try not to throw up). I think that one way to solve the original problem would be to have some buffer that vi stuffs into the tty driver at suspend time. Any ideas on how to pursue this (not that it's partiularly useful, but it might be fun). David