Running process gets killed when put to background

Bug #1397119 reported by Sam Bull
68
This bug affects 15 people
Affects Status Importance Assigned to Milestone
Ubuntu Terminal App
Confirmed
Undecided
Unassigned

Bug Description

1. Run 'top'.
2. Use right edge swipe to switch away from terminal app.
3. Switch back to terminal app after a few seconds and see that the running process has been stopped.

The process can be manually restored by running fg, but should be automatically restored when switching back to the app, ideally with no interruption to the terminal output (i.e. no '[stopped]' etc. messages).

Revision history for this message
Adrian Lewis (adrian-lewis) wrote :

the terminal app is unusable in its current state. When we switch away the current process is stopped and fg hangs the terminal.

Revision history for this message
Richard Ulrich (richi-paraeasy) wrote :

This is especially annoying when running is a script that mounts/unmounts some directories for a chroot.

Revision history for this message
AlainKnaff (kubuntu-misc) wrote :

It is also annoying for apps that put the terminal into a special mode (for curses, and such).

Example: vi

When coming back to the terminal, vi gets stopped automatically, and terminal (stty) settings are restored by bash to their default mode. When foregrounding vi again with fg, it doesn't restore the stty settings that it needs, and from thereon its output is all messed up.

Happens not only if you switch to another application or scope, but also when locking the screen.

This is a useability nightmare when using via as a notepad during shopping, and putting the phone into your pockets between jotting down notes at various places.

Revision history for this message
AlainKnaff (kubuntu-misc) wrote :

Confirmed, as experienced by several people

Changed in ubuntu-terminal-app:
status: New → Confirmed
Revision history for this message
AlainKnaff (kubuntu-misc) wrote :

A workaround for this:
  exec ssh localhost

:-)

(you first need to append you id_dsa.pub key to your authorized_keys though...)

And, if you only need to execute vi once:

 exec vi myfile.txt

If you quit vi, it closes the terminal though.

Revision history for this message
SouthBay (southbay-temp) wrote :

Another workaround is to switch your UI from "Staged mode" to "Windowed mode". Can be done editing configs directly or using the Ubuntu Touch Tweak Tool. All Terminal tabs then run within a desktop-like window and are not stopped in the background.

If you maximize the application's window so it takes up all of the device's screen, there's little difference in the interface. Also window size seems to be sticky, so the next time you run Terminal (or any other app), it will run in a maximized window.

Revision history for this message
Set Hallstrom (sakrecoer) wrote :

This bug could be a duplicate of #1502197

Revision history for this message
AlainKnaff (kubuntu-misc) wrote :

Is #1502197 really the same bug? Depending on how you read #1502197 , this might actually be exactly the opposite...
_Current_ behavior is, processes are automatically put in the background as soon as you switch away from the terminal. What we want is that they stay in the foreground. Bug #1502197 seems to _want_ processes to be run in the background... (or at best, the wording is very ambiguous...)

Revision history for this message
AlainKnaff (kubuntu-misc) wrote :

(In reply to comment #6)

Thanks for this tip. This does indeed solve the issue, but unfortunately at a price: Now the keyboard no longer "pushes up" the terminal when it appears (leaving the last entered text legible), but instead partly covers the terminal (obscuring the last entered text), which make the terminal rather unusable :-(

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.