fc: refactor --daemonize option

Option --daemonize is invalid to firecarcker, and only valid to
jailer.

Fixes: #389

Signed-off-by: Penny Zheng penny.zheng@arm.com
This commit is contained in:
Penny Zheng 2020-07-15 06:41:36 +00:00
parent 7f3e8959c5
commit 1d7d944f2c

View File

@ -365,10 +365,6 @@ func (fc *firecracker) fcInit(timeout int) error {
return err
}
if !fc.config.Debug {
args = append(args, "--daemonize")
}
//https://github.com/firecracker-microvm/firecracker/blob/master/docs/jailer.md#jailer-usage
//--seccomp-level specifies whether seccomp filters should be installed and how restrictive they should be. Possible values are:
//0 : disabled.
@ -382,6 +378,7 @@ func (fc *firecracker) fcInit(timeout int) error {
"--uid", "0", //https://github.com/kata-containers/runtime/issues/1869
"--gid", "0",
"--chroot-base-dir", fc.chrootBaseDir,
"--daemonize",
}
args = append(args, jailedArgs...)
if fc.netNSPath != "" {