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