Browse Source

close file when the process closes.

pull/87/head
Jae Kwon 9 years ago
parent
commit
bbcb6a09c4
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      process/process.go

+ 4
- 0
process/process.go View File

@ -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…
Cancel
Save