[Konsole-devel] Review Request: close session reliably when the terminal process doesn't die with SIGHUP

Jekyll Wu adaptee at gmail.com
Fri Aug 26 14:51:57 UTC 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/102239/
-----------------------------------------------------------

(Updated Aug. 26, 2011, 2:51 p.m.)


Review request for Konsole.


Changes
-------

recreate against master


Summary
-------

Currently, konsole kills the terminal process by sending SIGHUP and optionllay close the pty device. It is quite generic and works well with most terminal process. But it fails with some special programs.

The common root cause  of those 3 bugs is: autossh, irssi and su won't die after receiving SIGHUP. The action of closing pty device does not make them die, either(which really confuses me a bit). 

This patch will adds a last resort: sends SIGKILL to the terminal process, if existing way has failed. 

I feel a bit worried about some implementation details in this patch: annotations, namings, public or private, timeout length, etc. So plese take it as a starting point, if the idea is OK.


This addresses bugs 241709, 251566 and 254600.
    http://bugs.kde.org/show_bug.cgi?id=241709
    http://bugs.kde.org/show_bug.cgi?id=251566
    http://bugs.kde.org/show_bug.cgi?id=254600


Diffs (updated)
-----

  src/MainWindow.cpp 507fbe3 
  src/Session.h 2060bb5 
  src/Session.cpp a9b8490 
  src/SessionController.h 8ae33cf 
  src/SessionController.cpp fbb8531 
  src/ViewManager.cpp 26d4270 

Diff: http://git.reviewboard.kde.org/r/102239/diff


Testing
-------

I have tested this patch with 3 profiles contains 'autossh -M 0:7 user at host', 'irssi' and 'su -l' as commnd, and konsole can close session created from those profiles as expected. No regression observed so far.


Thanks,

Jekyll

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20110826/dbb833e5/attachment.html>


More information about the konsole-devel mailing list