Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Mar 2016 13:27:44 +0700
From:      Olivier Nicole <Olivier.Nicole@cs.ait.ac.th>
To:        questions@freebsd.org
Subject:   Re: Cshell closing on CTRL-c
Message-ID:  <wu737ryq23j.fsf@banyan.cs.ait.ac.th>
In-Reply-To: <20160309131906.eca65270.freebsd@edvax.de> (message from Polytropon on Wed, 9 Mar 2016 13:19:06 %2B0100)

next in thread | previous in thread | raw e-mail | index | archive | help
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?

% 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;

> 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?

No, the only change is from FreeBSD 10.1 to 10.2.

But now I have something even more puzzling:

banyan<on>41: csh -f
% CTRL-C
% CTRL-C
% CTRL-C
% echo oo bar
oo bar
% CTRL-C
% CTRL-C 
% CTRL-C
% uname -a
FreeBSD banyan.cs.ait.ac.th 10.2-RELEASE-p12 FreeBSD 10.2-RELEASE-p12 #2 r295233: Thu Feb 18 13:42:07 ICT 2016     root@banyan.cs.ait.ac.th:/usr/obj/usr/src/sys/CSIM  amd64
% CTRL-C
banyan<on>42: 

I start a csheel with no environment, no startscript. CTRL-C does
nothing until I execute the 1st command. Then it terminates the shell.

Whatever the command be (if it is not a shell internal command).

I had the same behavious on xterm and on console and on any 64bits
system. 32 bits are immune.

I think I may have to report that as a bug.

What do you think?

Bestregards,

Olivier



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?wu737ryq23j.fsf>