waitForPid: fix goroutine leak

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
This commit is contained in:
Gaurav Singh 2020-06-07 17:33:10 -04:00
parent 38cb1c1a54
commit ae08491bff

View File

@ -87,7 +87,7 @@ func adjustOom(adjustment int) (int, error) {
}
func waitForPid(process *os.Process) (int, error) {
c := make(chan int)
c := make(chan int, 1)
go func() {
for {
pid := process.Pid