mirror of
https://github.com/fluencelabs/tendermint
synced 2025-05-11 22:37:11 +00:00
close file when the process closes.
This commit is contained in:
parent
4ae29e0ae5
commit
bbcb6a09c4
@ -74,6 +74,10 @@ func Create(mode int, label string, execPath string, args []string, input string
|
||||
}
|
||||
}
|
||||
proc.EndTime = time.Now() // TODO make this goroutine-safe
|
||||
err = proc.OutputFile.Close()
|
||||
if err != nil {
|
||||
fmt.Printf("Error closing output file for %v: %v\n", proc.Label, err)
|
||||
}
|
||||
close(proc.WaitCh)
|
||||
}()
|
||||
return proc, nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user