Bug 361256

Summary: Close/exit konsole on bash crash/termination
Product: [Applications] konsole Reporter: William L. Thomson Jr. <wlt-ml>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED INTENTIONAL    
Severity: wishlist CC: cpigat242
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Patch to change exit behavior when bash crashes, per the user kill -9 $BASHPID

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.