From: Will Renkel on

I have a need under CYGWIN to have a break(ctrl-C) handler identical to vanilla UNIX.
Currently under CYGWIN, the break sequence does NOT seem to clear type ahead commands.
Hence a sequence such as sleep 15; hhh;jjj ... BREAK
terminates the sleep but then executes hhh and jjj.
I can program a trap handler to clear the type ahead using 'tcflush(0, TCIFLUSH)'.
But then I don't get correct handling of such things as unbalanced quotes on the input line.
Hence input of -> 'abc <- will not terminate with a BREAK until I enter a single quote.
So what I am looking for is a way to use the tcflush with the standard system capability.
Any ideas for a solution?
I asked this question under cygwin group
but am adding it here as well.
Like, how do I use the system handling AND add to it in the trap handler?

--
---------------------------------------------------------------
Will Renkel
Wheaton, Ill.

---------------------------------------------------------------