minijail: Set new process group ID.

By setting a new process group ID (PGID) in Minijail, we can then kill
both the Minijail process and the jailed process. Before, daemons like
debugd were killing only the Minijail process, which doesn't stop the
jailed process.

BUG=chromium:486219
TEST='minijail0 -- /usr/bin/yes'
TEST='ps axj' shows |minijail0| and |yes| with the same PGID.

Change-Id: Ibc82948aeedd560c08c182194723ccd53ec9b764
Reviewed-on: https://chromium-review.googlesource.com/271327
Trybot-Ready: Jorge Lucangeli Obes <jorgelo@chromium.org>
Tested-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Reviewed-by: Samuel Tan <samueltan@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Jorge Lucangeli Obes <jorgelo@chromium.org>
1 file changed