Move exec and checkpoint to process state
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
cf28969328
commit
d317f71ac2
5 changed files with 26 additions and 31 deletions
|
@ -47,6 +47,8 @@ type processConfig struct {
|
|||
spec *specs.LinuxSpec
|
||||
c *container
|
||||
stdio Stdio
|
||||
exec bool
|
||||
checkpoint string
|
||||
}
|
||||
|
||||
func newProcess(config *processConfig) (*process, error) {
|
||||
|
@ -67,12 +69,14 @@ func newProcess(config *processConfig) (*process, error) {
|
|||
}
|
||||
defer f.Close()
|
||||
if err := json.NewEncoder(f).Encode(ProcessState{
|
||||
Process: config.processSpec,
|
||||
RootUID: uid,
|
||||
RootGID: gid,
|
||||
Stdin: config.stdio.Stdin,
|
||||
Stdout: config.stdio.Stdout,
|
||||
Stderr: config.stdio.Stderr,
|
||||
Process: config.processSpec,
|
||||
Exec: config.exec,
|
||||
Checkpoint: config.checkpoint,
|
||||
RootUID: uid,
|
||||
RootGID: gid,
|
||||
Stdin: config.stdio.Stdin,
|
||||
Stdout: config.stdio.Stdout,
|
||||
Stderr: config.stdio.Stderr,
|
||||
}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue