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

Jekyll Wu adaptee at gmail.com
Sun Aug 7 18:43:17 UTC 2011


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

(Updated Aug. 7, 2011, 6:43 p.m.)


Review request for Konsole.


Changes
-------

forgot to remove one debugging message.


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 6387ce5 
  src/Session.cpp 8b735e7 
  src/SessionController.h 8ae33cf 
  src/SessionController.cpp 3f1b6c9 
  src/ViewManager.cpp dd028cb 

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/20110807/c44da227/attachment.html>


More information about the konsole-devel mailing list