[Konsole-devel] [Bug 221726] Session Finished With Non-Zero Status popup notification for bash exit 0

Jekyll Wu adaptee at gmail.com
Tue Jul 19 14:11:22 UTC 2011


https://bugs.kde.org/show_bug.cgi?id=221726





--- Comment #1 from Jekyll Wu <adaptee gmail com>  2011-07-19 14:11:22 ---
Created an attachment (id=61984)
 --> (http://bugs.kde.org/attachment.cgi?id=61984)
trigger the notification only when terminal process finishes with non-zero
exitcode

    I can reproduce this with 2.7.999 and I'm pretty sure there is bug in the
code.

    The attached patch is a quick fix. Its main purpose is to point out the
bug.

    Some thoughts about Session::done(int exitStatus)

    1). this slot is connected with signal QProcess::finished(int exitCode,
QProcess::ExitStatus exitStatus).
        so the parameter name is misleading. It actually should be named as
exitCode.

    2). _wantedClose is the root cause. It is initialized to false and  becomes
true only when user close the session from menu . So if the terminal process
finishes itself , '!_wantedClose || exitStatus != 0' is always ture, and the
notification is trigged.

    3). _wantedClose is not a name clear enough . Is _userWantedClose or
better?

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the konsole-devel mailing list