Fix the race condition between creating and killing process group

Framework takes care of the process group creation for the processes
forked by webview and app zygote. There is a small window
between the fork and the process group creation, if the process is
deemed to be killed during that window, the process group creation
would fail and crash the system. Now add a lock around that.

Bug: 270103958
Test: Manual
Change-Id: Id602d9cd5243b7726d88e2fa40fd3d3431086a64
2 files changed