Close files upon stop. Still need to fix bash issues?

This commit is contained in:
Jae Kwon
2015-04-16 19:04:21 -07:00
parent 9dd37c6bc4
commit 02bc535e0e
2 changed files with 2 additions and 0 deletions

View File

@ -84,6 +84,7 @@ func Create(mode int, label string, execPath string, args []string, input string
}
func Stop(proc *Process, kill bool) error {
defer proc.OutputFile.Close()
if kill {
fmt.Printf("Killing process %v\n", proc.Cmd.Process)
return proc.Cmd.Process.Kill()