Xref: utzoo comp.mail.misc:1156 comp.unix.questions:8672 Path: utzoo!utgpu!attcan!uunet!peregrine!elroy!ames!pasteur!cory.Berkeley.EDU!dheller From: dheller@cory.Berkeley.EDU (Dan Heller) Newsgroups: comp.mail.misc,comp.unix.questions Subject: Re: strange timing problem in /usr/ucb/Mail Summary: Problem with ioctl TIOCSTI Message-ID: <4930@pasteur.Berkeley.EDU> Date: 9 Aug 88 23:27:28 GMT Sender: news@pasteur.Berkeley.EDU Reply-To: dheller@cory.Berkeley.EDU.UUCP (Dan Heller) Organization: University of California, Berkeley Lines: 28 > ables@catwoman.ACA.MCC.COM (King Ables) writes: >We noticed a strange timing problem in /usr/ucb/Mail today... >The problem occurs when replying to a message which many >recipients and you ^D at the end of the message and the CC: >line is shown to you (you have askcc set in your .mailrc). >If the Cc: line has several addresses on it so that it wraps >to a 2nd line AND if you hit ^D and(the in >response to the Cc: line prompt) VERY QUICKLY, there seems The problem is the ucbMail uses TIOCSTI to retype your Cc: line as if you typed it. This is how Mail gives you your headers and positions the cursor in the right place without having to put you in cbreak/noecho mode to keep track of how many chars to allow you to backspace. The timing problem is a correct assumption ... apparently, the BSD driver allows certain characters to sneak in before normal chars. So, when you hit CR or ^D, that gets interpreted immediately and the rest of the string is either lost or sent to whatever wants to read your input next. Those of you who use command line completion in csh on sunOS or similar shells might notice the same problem (that you *must* wait for the completion or the whole line is fubar). There is no fix for this -- just wait till the whole line prints before you hit your CR or ^D or use a better mail interface than Mail. Dan Heller