exec: expose --preserve-fds

The implementation is already there, we only need to add the CLI
option and pass it down.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano
2019-02-25 10:58:43 +01:00
parent 5b5130ad76
commit 52f4e0facc
3 changed files with 17 additions and 0 deletions

View File

@@ -89,6 +89,10 @@ following will output a list of processes running in the container:
Usage: "disable the use of the subreaper used to reap reparented processes",
Hidden: true,
},
cli.IntFlag{
Name: "preserve-fds",
Usage: "Pass N additional file descriptors to the container (stdio + $LISTEN_FDS + N in total)",
},
},
Action: func(context *cli.Context) error {
if err := checkArgs(context, 1, minArgs); err != nil {
@@ -141,6 +145,7 @@ func execProcess(context *cli.Context) (int, error) {
pidFile: context.String("pid-file"),
action: CT_ACT_RUN,
init: false,
preserveFDs: context.Int("preserve-fds"),
}
return r.run(p)
}