Cleanup stdio files upon start and exec termination (ctr).
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
@@ -164,6 +164,11 @@ var startCommand = cli.Command{
|
|||||||
fatal(fmt.Sprintf("cannot get the absolute path of the bundle: %v", err), 1)
|
fatal(fmt.Sprintf("cannot get the absolute path of the bundle: %v", err), 1)
|
||||||
}
|
}
|
||||||
s, err := createStdio()
|
s, err := createStdio()
|
||||||
|
defer func() {
|
||||||
|
if s.stdin != "" {
|
||||||
|
os.RemoveAll(filepath.Dir(s.stdin))
|
||||||
|
}
|
||||||
|
}()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fatal(err.Error(), 1)
|
fatal(err.Error(), 1)
|
||||||
}
|
}
|
||||||
@@ -463,6 +468,11 @@ var execCommand = cli.Command{
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
s, err := createStdio()
|
s, err := createStdio()
|
||||||
|
defer func() {
|
||||||
|
if s.stdin != "" {
|
||||||
|
os.RemoveAll(filepath.Dir(s.stdin))
|
||||||
|
}
|
||||||
|
}()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fatal(err.Error(), 1)
|
fatal(err.Error(), 1)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user