Re: Control-C kills interactive bash
On Thu, 2008-03-06 at 16:58 +1300, Lesley Walker wrote:
> Ron Johnson wrote:
> > On 03/05/08 17:39, Lesley Walker wrote:
> >
> > > After upgrading from Sarge to Etch, I have this problem, Ctrl-C kills
> > > the current interactive Bash shell.
> > > ...
> > > I feel as though I must be overlooking something completely obvious, can
> > > anyone suggest what?
> > >
> > Console or an X window?
> >
> It happens on both.
>
> Never mind... I think I found it. We have this line in /etc/profile:
> trap "exit" 2 3 23
> If I comment it out the problem goes away. Time for me go and RTFM on
> traps.
I think people have been misreading this. It means on signals 2, 3 or 23
then call exit. Signal 2 is SIGINT. Thus your trap is doing the
expected.
For what it's worth, I've no 'trap' comment in any of my /etc/profile
files... do you really want to close a shell on certain user signals???
M
Reply to: