Applications can escape from lifecycle
Bug #1358753 reported by
Ted Gould
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Application Launcher |
Fix Released
|
Critical
|
Ted Gould |
Bug Description
Currently in the releases applications can easily escape for the lifecycle by creating a new process group. To avoid this we need to use cgroups in the application jobs. Currently that is blocked on:
https:/
After that lands then we can land a branch to fix this bug. Bug is mostly for tracking to ensure we don't miss this going into RTM.
Related branches
lp:~ted/ubuntu-app-launch/unrevert-cgroups
- Charles Kerr (community): Approve
- PS Jenkins bot (community): Approve (continuous-integration)
-
Diff: 35 lines (+15/-2)2 files modifieddebian/changelog (+13/-0)
tests/zg-test.cc (+2/-2)
tags: | added: rtm14 |
Changed in ubuntu-app-launch: | |
status: | New → In Progress |
importance: | Undecided → Critical |
assignee: | nobody → Ted Gould (ted) |
Changed in ubuntu-app-launch: | |
status: | In Progress → Fix Released |
To post a comment you must log in.
I was asked, so I thought I'd put the comment here as well. Here's how you avoid the application lifecycle:
int main (int argc, char * argv[]) {
pid_d pid = 0;
if ((pid = fork()) != 0) {
waitpid(pid);
return 0;
|
setpgid(0,0);
/* You're free!!!!! */
}
The parent will get stopped and started based on application lifecycle states but anything in the rest of the main function will be unaffected.