TIOCFLUSH of input only - any way to do it?
Dave Sherman
dave at utcsrgv.UUCP
Thu Jun 23 03:58:41 AEST 1983
I am writing an interactive program to be used by non-computer people.
I want to spit some text to the screen, and say "press RETURN to continue",
and somehow ensure that only a CR pressed after I put the text on the
screen will be caught.
The obvious thing is to flush all input with ioctl-TIOCFLUSH,
immediately before saying "press RETURN". But when I do that, the TIOCFLUSH
stops some of the output from getting to the screen.
Is there any way to flush the input queue without flushing the
output, or a way to wait until the chars on the output queue have actually
been sent to the terminal?
Thanks for any (*pointer)s.
Dave Sherman
Toronto
More information about the Comp.unix.wizards
mailing list