Summary: | Session Finished With Non-Zero Status popup notification for bash exit 0 | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | M. P. Čtyři <spiro.multimax+kdebugzilla> |
Component: | general | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 0.9 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 2.8 | |
Sentry Crash Report: | |||
Attachments: | trigger the notification only when terminal process finishes with non-zero exitcode |
Description
M. P. Čtyři
2010-01-07 23:32:21 UTC
Created attachment 61984 [details]
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?
Git commit b8b3f23723690cc67d38add4209a34c15c21b990 by Kurt Hindenburg. Committed on 20/07/2011 at 15:53. Pushed by hindenburg into branch 'master'. Correct non-zero status notification such that it works. The non-zero notification was being displayed for zero exit codes. Thanks again to Jekyll Wu (adaptee@gmail.com) for patch and research. BUG: 221726 FIXED-IN: 2.8 M +3 -2 src/Session.h M +8 -9 src/Session.cpp http://commits.kde.org/konsole/b8b3f23723690cc67d38add4209a34c15c21b990 |