Cshell closing on CTRL-c

Polytropon freebsd at edvax.de
Wed Mar 9 12:19:09 UTC 2016

On Wed, 09 Mar 2016 17:30:59 +0700, Olivier Nicole wrote:
> Hi,
> I have that very annoying feature lately: /bin/csh will close when I
> type CTRL-C.

Somehow this sounds familiar! Can you provide what configuration
change you made prior to this behaviour?

For control characters, check the output of "stty -a". Here is
an example where Ctrl+C acts as intended:

	% stty -a
	cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
	        eol2 = <undef>; erase = ^H; erase2 = ^H; intr = ^C; kill = ^U;
        	lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q;
	        status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;

Where does ^C appear in your output?

The shell also exits on "end of input", which is ^D (eof) which
can be prevented by "set ignoreeof".

> I am not sure how this feature even hapened, it seems it does not affect
> all the systems I have.
> Any idea?

Changes to /etc/csh.cshrc or ~/.cshrc?

Try this:

	% stty intr ^C kill ^U

Source: https://docs.freebsd.org/44doc/usd/04.csh/paper.pdf

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list