supervisor/shim: add exec support
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
@@ -39,13 +39,13 @@ var execCommand = cli.Command{
|
||||
return err
|
||||
}
|
||||
|
||||
id := time.Now().Format("2006-_2-01_15:04:05")
|
||||
tmpDir, err := getTempDir(id)
|
||||
tmpDir, err := getTempDir(time.Now().Format("2006-02-01_15:04:05"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer os.RemoveAll(tmpDir)
|
||||
|
||||
id := context.String("id")
|
||||
sOpts := &execution.StartProcessRequest{
|
||||
ContainerID: id,
|
||||
Process: &execution.Process{
|
||||
|
||||
@@ -117,6 +117,10 @@ var runCommand = cli.Command{
|
||||
break eventLoop
|
||||
}
|
||||
|
||||
if e.Type != "exit" {
|
||||
continue
|
||||
}
|
||||
|
||||
if e.ID == cr.Container.ID && e.Pid == cr.InitProcess.Pid {
|
||||
ec = e.ExitStatus
|
||||
break eventLoop
|
||||
|
||||
Reference in New Issue
Block a user