Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #502 from vania-pooh/master
Browse files Browse the repository at this point in the history
Waiting for driver process to stop on Windows (fixes #499)
  • Loading branch information
vania-pooh authored Jul 22, 2018
2 parents eea374a + 7472d94 commit d4ce26a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion service/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (d *Driver) stopProcess(cmd *exec.Cmd) {
log.Printf("[%d] [FAILED_TO_TERMINATE_PROCESS] [%d] [%v]", d.RequestId, cmd.Process.Pid, err)
return
}
if d.CaptureDriverLogs && d.LogOutputDir != "" {
if !d.CaptureDriverLogs && d.LogOutputDir != "" {
cmd.Stdout.(*os.File).Close()
}
log.Printf("[%d] [TERMINATED_PROCESS] [%d] [%.2fs]", d.RequestId, cmd.Process.Pid, util.SecondsSince(s))
Expand Down
4 changes: 3 additions & 1 deletion service/driver_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ import (
)

func stopProc(cmd *exec.Cmd) error {
return cmd.Process.Kill()
error := cmd.Process.Kill()
cmd.Wait()
return error
}

0 comments on commit d4ce26a

Please sign in to comment.