Add optional signal forwarder and '-z' option to cli

Add a 'forward_signal' option to the minijail configuration struct that
defaults to false, but when set installs a signal handler in the parent
process that forwards any signal received (except SIGCHLD) to the jailed
child process.

The minijail0 cli defaults to having this setting enabled, but called
with the `-z` option this is disabled.

This is used to make daemon management (e.g. with `sv`) easier, since
otherwise SIGTERM on minijail0 just orphans the true service.

Change-Id: Ide0471511a4242839e3c8a34795e5a297b6ef57a
3 files changed