init: Purge empty process groups on zygote restart
When system_server crashes or gets killed, it causes zygote to kill itself, which in turn leads to killing all processes in the same process group (all apps). This leaves empty process groups because system_server is not there to remove them. Purge empty process groups when init detects zygote death. Bug: 228160715 Signed-off-by: Suren Baghdasaryan <surenb@google.com> Change-Id: I0ce27eea28f8713e52033bbec2d5363a7b8ff5db
This commit is contained in:
parent
4345f3f50a
commit
af64077f83
1 changed files with 4 additions and 0 deletions
|
|
@ -288,6 +288,10 @@ void Service::Reap(const siginfo_t& siginfo) {
|
|||
|
||||
if (flags_ & SVC_EXEC) UnSetExec();
|
||||
|
||||
if (name_ == "zygote" || name_ == "zygote64") {
|
||||
removeAllEmptyProcessGroups();
|
||||
}
|
||||
|
||||
if (flags_ & SVC_TEMPORARY) return;
|
||||
|
||||
pid_ = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue