Need better session management for apps

Bug #1628589 reported by Christopher Townsend on 2016-09-28
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Canonical System Image
High
Alejandro J. Cura
Libertine
Status tracked in Devel
Devel
Medium
Unassigned
Trunk
Medium
Unassigned
libertine (Ubuntu)
Medium
Unassigned
ubuntu-app-launch (Ubuntu)
High
Unassigned
unity8 (Ubuntu)
Medium
Unassigned

Bug Description

This is the master bug for better session management for apps. All other bugs affected by this will be dup'ed to this bug.

Currently, if a user closes an app using the 'X' button on the window, many bad things can happen including data loss.

If a user is editing a document and accidentally hits the X while the data is not saved, the user will not be prompted to save and the data will be lost.

Another example is Libertine helper apps can crash when Xmir is killed.

Christopher Townsend (townsend) wrote :

For this, we should move the handling of starting and stopping Xmir into libertine-launch and out of ubuntu-app-launch.

Then, ubuntu-app-launch should send SIGTERM to the actual X app pid and wait for the Mir window(s) to be gone. When the windows are gone, but pids still exist, then u-a-l will send SIGKILL to any remaining pids.

Changed in libertine (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-app-launch (Ubuntu):
status: New → Confirmed
Changed in ubuntu-app-launch (Ubuntu):
importance: Undecided → Medium
Changed in libertine:
milestone: 1.5 → 1.6
Changed in libertine:
milestone: 1.6 → 1.7
Michał Sawicz (saviq) on 2017-03-23
Changed in canonical-devices-system-image:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Alejandro J. Cura (alecu)
summary: - Need better session management for Libertine X apps
+ Need better session management for apps
Changed in unity8 (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Michał Sawicz (saviq) wrote :

This actually affects all apps, not only Libertine ones.

We need UAL API to only send SIGTERM to the app (ideally only the main PID, if possible), in case it wants to pop a "Do you want to save..." dialog up. When that PID exits, we should also SIGTERM (and ultimately SIGKILL) all remaining processes in the group.

Separately, we need a "kill" method that would do SIGTERM and ultimately SIGKILL (or maybe SIGKILL directly, you asked to kill after all) the whole group.

description: updated
Changed in ubuntu-app-launch (Ubuntu):
assignee: nobody → Ted Gould (ted)
importance: Medium → High
Daniel van Vugt (vanvugt) wrote :

Whoa, hold on.... What does SIGTERM have to do with it?

Never mind. The problem described at the top here does not occur in Mir demo servers, only Unity8. Duplicate of bug 1671424.

tags: added: unity8-desktop
Michał Sawicz (saviq) wrote :

No, not a duplicate - bug 1671424 is about *not* signalling the processes, but just closing the windows.

This bug is about quitting the whole app at once (not all its windows in sequence) or force-quitting it for whatever reason (say, misbehaving app).

With Unity8, an app is more than just the Mir client - it's the whole group of processes managed through UAL/systemd.

Ted Gould (ted) on 2017-04-12
Changed in ubuntu-app-launch (Ubuntu):
assignee: Ted Gould (ted) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers