Merge lp:~afrantzis/unity-system-compositor/no-external-spinner-zombie-processes into lp:unity-system-compositor
Proposed by
Alexandros Frantzis
Status: | Work in progress | ||||
---|---|---|---|---|---|
Proposed branch: | lp:~afrantzis/unity-system-compositor/no-external-spinner-zombie-processes | ||||
Merge into: | lp:unity-system-compositor | ||||
Diff against target: |
271 lines (+180/-15) 5 files modified
src/external_spinner.cpp (+85/-4) tests/integration-tests/CMakeLists.txt (+1/-0) tests/integration-tests/spin_wait.cpp (+39/-0) tests/integration-tests/spin_wait.h (+39/-0) tests/integration-tests/test_external_spinner.cpp (+16/-11) |
||||
To merge this branch: | bzr merge lp:~afrantzis/unity-system-compositor/no-external-spinner-zombie-processes | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Unity System Compositor Development Team | Pending | ||
Review via email: mp+264281@code.launchpad.net |
Commit message
Don't leave zombie spinner processes
Description of the change
Don't leave zombie spinner processes
This MP uses the double-fork trick to avoid zombie spinner process. It works by forking an intermediate process which then forks again to execute the real spinner process. The intermediate process exits immediately, orphaning the spinner process, which is then adopted by init (pid 1). The init process then takes care of waiting for the process to exit.
To post a comment you must log in.
Unmerged revisions
- 224. By Alexandros Frantzis
-
Don't leave zombie spinner processes
Haven't looked at the branch in detail, but I'm surprised it needs much work at all... Simply calling wait() or waitpid() at the right times will avoid zombies. That's what "zombie process" means -- that the parent has not called wait() yet.