Bug 294946 - zsh-4.3.17 and konsole: ctrl-c kills su session instead of running app.
Summary: zsh-4.3.17 and konsole: ctrl-c kills su session instead of running app.
Status: RESOLVED WORKSFORME
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-27 19:33 UTC by Volker Hemmann
Modified: 2012-04-18 03:54 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Hemmann 2012-02-27 19:33:02 UTC
Version:           unspecified (using KDE 4.8.0) 
OS:                Linux

when being su'ed root, hitting ctrl-c to exit a program will terminate the su session instead. This does not happen with earlier versions of zsh.


Reproducible: Always

Steps to Reproduce:
make zsh your default shell
start konsole
su - 
ping www.google.com
hit ctrl-c


Actual Results:  

su session ends, ping continues

Expected Results:  
su session alive, ping dead

see also this:
https://bugs.gentoo.org/show_bug.cgi?id=405825

only konsole seems to be hit. xterm is fine. vt are fine.
Comment 1 Jekyll Wu 2012-02-27 20:41:49 UTC
Thanks for reporting.

I happens to be also using Zsh and Gentoo(at the moment). However, I failed to reproduce the reported problem using the same version. My system environment is basically the same as the ones listed in the gentoo bug report, except that I use a 32 bit system and the pf-sources kernel.
Comment 2 Jekyll Wu 2012-03-05 02:35:07 UTC
Tried the same versions on Archlinux. Still can't reproduce.
Comment 3 Volker Hemmann 2012-03-11 13:22:22 UTC
last night it started again, in the middle of kde update after ca 10h uptime.

With zsh 4.3.15 even.

With 4.3.15 it does not happen always. With 4.3.17 it does.
Comment 4 Mark Brandis 2012-04-09 08:16:55 UTC
I can confirm this problem. 

Debian Testing
zsh 4.3.17-1
konsole 4:4.7.4-2

But it happens also with xterm and gnome-terminal. Seems to be a zsh problem.

xterm 276-2
gnome-terminal 3.2.1-2
Comment 5 Volker Hemmann 2012-04-09 11:33:05 UTC
yeah, last night I tried xterm again and this time it happened there too. xterm 276.
Comment 6 Jekyll Wu 2012-04-09 13:15:30 UTC
Thanks for the update. Strangely, I just can not reproduce it using zsh-4.3.17 in all the distributions installed on my machine: Arch, Gentoo, Debian Sid, Fedora 16.

Let me make a short summary of the known facts of this problem:

1. It happens in Gentoo and Debian Testing. Not a distro specifc problem
2. It happens in both konsole and xterm. Not a emulator specific problem
3. It happens in amd-64 architecture(see the gentoo report). I'm using i686 and can't reproduce it. Maybe it is an architecture specific problem? Mark, which architecture are you using ?
4. It happens in zsh-4.3.17(everytime?) and zsh-4.3.15(sometimes?).

Well, all those facts suggest it might be a zsh problem. Since you guys can reproduce it, please check whether the problem exist when using the combination of konsole/xterm/rxvt-unicode/...  + bash/tcsh/fish/...  If all those combinations work well, then it must be a zsh problem.
Comment 7 Mark Brandis 2012-04-09 13:35:24 UTC
It has nothing to do with kde, in my opinion. I have the problem on i386 and x86_64 architecture but I only have the problem when I use 'sux' (Debian package). When I use 'su' it does not happen.
Comment 8 Jekyll Wu 2012-04-10 15:11:48 UTC
(In reply to comment #7)
> but I only have the problem when I use 'sux' (Debian
> package). When I use 'su' it does not happen.

Hm, that confuses me furthur.  Who is in fault here: emulaor, shell, or su/sux ?

As I have mentioned in comment #6, please  try reproducing the probelm using shells other than zsh. 

And just to clarify, when you say zsh, is zsh the shell of normal user, or the shell of root, or the shell of both?  I myself use zsh for both.
Comment 9 Mark Brandis 2012-04-10 17:39:43 UTC
More tests:

From normal user with konsole/zsh, xterm/zsh, gnome-terminal/zsh, konsole/bash, xterm/bash execute:
sux -
CTRL+C
=> Session terminated, terminating shell...

It does not matter if the root user has zsh or bash as login shell.

With 'su -' everything is fine.
Comment 10 Jekyll Wu 2012-04-10 18:26:27 UTC
(In reply to comment #9)
> More tests:
> 
> From normal user with konsole/zsh, xterm/zsh, gnome-terminal/zsh,
> konsole/bash, xterm/bash execute:
> sux -
> CTRL+C
> => Session terminated, terminating shell...
> 
> It does not matter if the root user has zsh or bash as login shell.
> 
> With 'su -' everything is fine.

Mark, thanks for the update. 

I can now reproduce your problem using sux on my gentoo box. It happens regardless of shell and emulator. Then the culprit in your case is sux . Since I don't use that wrapper until now, I don't know whether that's the desired behavior or recent regression.

However, the gentoo report is all about su. Volker, you mentioned in comment #5 that it happened in xterm too(while in the gentoo report you said xterm was OK). Could you please test some combinations of emulator & shell to see who is in fault? Sorry, I just can't reproduce it.
Comment 11 Volker Hemmann 2012-04-17 17:30:51 UTC
hi, sorry,  for the late response. At first xterm was fine, later it happened there too. But I also saw it at least once with su too. So..  but yeah, at the moment su seems to be fine.

So.. maybe closing it as invalid would be the right thing to do. Sorry for the noise.