Subject: Re: /bin/sh, /bin/csh and the '^C'
To: Andrew Gillham <>
From: Gandhi woulda smacked you <>
List: current-users
Date: 04/06/1999 22:27:15
On Mon, 5 Apr 1999, Andrew Gillham wrote:

# Hello,
# Ok, now that we're in 1.4_ALPHA, I'll complain again.. :-)
# With empty /etc/csh.* and no /root/.cshrc and /root/.login, I
# *still* see the control-c when I type it! (but it interrupts)
# # ^C
# # ^C

And the problem is...?

# If I use /bin/tcsh, I get the interrupt, but it does not print
# the '^C' also.

/bin/sh, /bin/csh and anything else that doesn't do raw input will
display the interrupt character in ^x notation.  Try 'restore', 'csh',
'cat', etc.

This has historically been true of all unices with sane default settings
on the tty driver.  The system V driver used to have echoctl unset and
would print out the raw character; this was especially misleading when
typing backspace with erase mapped to delete because the cursor would
move back over the previous character, but in reality the ^H was being
pushed onto the input queue.

# This has been attributed to a broken /bin/sh in the past, but
# it is still broken on my machines.  I see it on i386/vax/alpha/next68k
# all with wscons.
# What am I doing wrong??? :(

Nothing.  This is proper behaviour for non-raw% input, and
most certainly not a bug; indeed, for it to behave differently unless
input is cbrk'd would be considered by me (and probably many others with
any inkling of UNIX history) to be a bug.

# Thanks.
# -Andrew

% raw input won't even recognise tty chars as having any special