[Konsole-devel] [Bug 143880] Konsole does not kill su root 'top' process which zombifies

Lars Doelle lars.doelle at on-line.de
Sat Apr 14 12:02:25 UTC 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=143880         




------- Additional Comments From lars.doelle on-line de  2007-04-14 14:02 -------
All,

termination of a shell session is a somewhat complicate topic in Linux and Unix.

http://www.gnu.org/software/libc/manual/html_node/Job-Control.html#Job-Control

summarizes its basics.

What the konsole (and any other terminal, be it the linux console and the xterm
(clones)) do is more or less the same.

To summarize, closing the pty causes a SIGHUP being sent to the session leader
(e.g. shell) via the OS. This either does proper cleanups, or, if the session leader
is a stupid program, the OS tries to be helpful in cleaning up the orphaned process
groups by sending a SIGHUP. (It is more complicate, really.)

Thus, the described effect should either be reproducible under any terminal or clearly
indicates an error in the setup of the pty and or the session in the konsole.

And indeed, i was able to reproduce the behaviour with xterm.

My suspicion is that 'su' is to be blamed, really, but that's only wildly guessing.

I called your program 'termtest':

$ xterm
$ su
# ./termtest
(simply closing (X) the xterm)

'top' still shows termtest running.

Hope it helps

  Lars


On Thursday 05 April 2007 22:12, Jonathan E.Snow wrote:
[bugs.kde.org quoted mail]



More information about the konsole-devel mailing list