Bug 272944 - Konsole should auto-resume a stopped shell
Summary: Konsole should auto-resume a stopped shell
Status: RESOLVED INTENTIONAL
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-10 15:14 UTC by Christopher Yeleighton
Modified: 2011-11-11 05:24 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Yeleighton 2011-05-10 15:14:40 UTC
Version:           unspecified (using KDE 4.6.0) 
OS:                Linux

Resuming an accidentally stopped shell in Konsole is difficult; Konsole should resume it automatically because it makes no sense for a Konsole shell to be stopped.

Reproducible: Always

Steps to Reproduce:
  1. Tell the top-level shell in Konsole to { suspend; }

Actual Results:  
  1. The shell is suspended.

Expected Results:  
  1. Konsole should resume the shell.

OS: Linux (x86_64) release 2.6.37.6-0.5-desktop
Compiler: gcc

Workaround:
Find the suspended shell in the System Activity Monitor and resume it from there.
Comment 1 Jekyll Wu 2011-08-21 05:24:21 UTC
Can you give a practical example where user may suspend the shell accidentally with high probability? The only case I can think of is that user may make typo about pid when trying to stop another process by 'kill -STOP pid'. But even in that case, such users should already have the knowledge about how to resume it with 'kill -CONT pid'.

And, sometimes user might really want to suspend a shell.
Comment 2 Christopher Yeleighton 2011-08-21 21:18:56 UTC
<URL: info:/bash/Job%20Control%20Builtins >

suspend [-f]
      Suspend the execution of this shell until it receives a `SIGCONT'
      signal.  A login shell cannot be suspended; the `-f' option can be
      used to override this and force the suspension.

The reason why the login shell is protected from suspension is that the user would have a hard time waking it up; it is the same case in Konsole shell. 

While Konsole should not pretend the shell it runs is a login shell, it can simulate the prohibition as described above.

The operator can accidentally suspend the main shell by telling it to suspend (thinking it is a dependent shell).
Comment 3 Jekyll Wu 2011-11-06 01:32:34 UTC
Thanks for the example. However, I still think the possibility is quite low. 

And in that example, what if some user types 'suspend' in the main bash intentionally to verify that it does work as described in the document(Yes, I did)? If Konsole automatically resumes that suspended main bash, that user will be confused because 'suspend' does not suspend bash. And later when he/she finds out 'suspend' works in all terminal emulators except in Konsole, he/she might think that is a bug of Konsole and open another report.

A possible compromise is to re-implement the 'send signal' submenu from KDE3 konsole as requested in bug 214908, which will make it easier for some users to resume accidentally suspended main shell.