http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html says: If the shell is interactive: SIGQUIT and SIGTERM signals shall be ignored. The behavior of dash is correct when the signal has been sent with "kill" from another terminal, but if I type "foo", then the quit character (Ctrl-\ by default), then "bar", I get: $ foo^\bar dash: 1: bar: not found instead of: $ foobar dash: 1: foobar: not found
Dash is behaving correctly here. The flush of the input queue occurs because the NOFLSH flag is not set in termios c_lflag. After 'stty noflsh', there is still '^\' visible but the characters before it are not discarded. The default (to flush) is probably more useful, though.
The behavior is different with bash and zsh, but I suppose that this is because neither bash nor zsh uses the cooked mode. Well, if the signal is ignored, then it is more intuitive to disable flushing, IMHO, i.e. to ignore Ctrl-\ entirely. However the terminal handling is buggy in this case (I mean, if one types "foo" then Ctrl-\ then [Backspace], only the backslash is erased so that one gets "foo^" displayed instead of "fo").