go-cmd / cmd

Non-blocking external commands in Go with streaming output
MIT License
918 stars 128 forks source link

stop() error on windows #68

Closed silisium closed 2 years ago

silisium commented 3 years ago

os: Windows 10 21H1 go: 1.17.1

this code:

c := cmd.NewCmd("sleep", "10")
c.Start()
time.Sleep(5000 * time.Millisecond)
if err := s.Stop(); err != nil {
   fmt.Printf("%v", err)
}

output: DuplicateHandle: Descripteur non valide