Terminate the stub before -exec.

This commit is contained in:
Qi Xiao 2016-02-22 23:00:33 +01:00
parent 6fbadd6f31
commit e6c44bdbdd

View File

@ -673,6 +673,9 @@ func _exec(ec *EvalCtx, args ...string) {
if err != nil {
fmt.Fprintln(os.Stderr, err)
}
if ec.Stub != nil {
ec.Stub.Terminate()
}
err = syscall.Exec(args[0], args, os.Environ())
maybeThrow(err)
}