Bug 361256 - Close/exit konsole on bash crash/termination
Summary: Close/exit konsole on bash crash/termination
Status: RESOLVED INTENTIONAL
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-31 22:14 UTC by William L. Thomson Jr.
Modified: 2024-03-27 14:24 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to change exit behavior when bash crashes, per the user kill -9 $BASHPID (420 bytes, patch)
2016-04-13 19:33 UTC, William L. Thomson Jr.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description William L. Thomson Jr. 2016-03-31 22:14:06 UTC
There are many times I want to end a bash terminal session without recording my history. I use kill -9 $BASHPID to exit bash and not save my history. I do that so often I have an alias for it, bye. Every time I do this on konsole, instead of konsole closing/exiting, I get a message in red "Warning: Program '/bin/bash' crashed."

Reproducible: Always

Steps to Reproduce:
1. Open konsole
2. kill -9 $BASHPID
3. manually close the konsole window

Actual Results:  
Once bash crashes ( is killed ) and I must manually close the konsole window.

Expected Results:  
Konsole would close/exit upon bash crash. That way when I do kill -9 $BASHPID, it closes the window entirely. Which is what I want to happen in addition to not saving history. I am done with that terminal window entirely.

There really is no benefit to keeping the window open after bash crashes. Maybe for scrollback history, but in my case I specifically do not care about the history. Thus not wanting bash to record it to file. There is nothing more that can be done in that window. You cannot resume or restart the crashed/killed bash session.
Comment 1 William L. Thomson Jr. 2016-04-13 19:33:57 UTC
Created attachment 98385 [details]
Patch to change exit behavior when bash crashes, per the user kill -9 $BASHPID

Proposed fix to the bug I filed. It might not be the most elegant or long term solution. It does nothing if your shell is something other than bash. Not sure if this can be adapted to be universal for all shells and not require them to be hard coded as this comparison is. But the patch works for me, and konsole closes entirely when I do kill -9 $BASHPID :)
Comment 2 Kurt Hindenburg 2024-03-27 14:24:51 UTC
Thanks for the report but I don't think this would be good to have for everyone.  We keep the tab open upon error so people can view the issue and go about fixing/report it.