From ae08491bff2fdef7a91ff9c2d9e532d2f63d4bbd Mon Sep 17 00:00:00 2001 From: Gaurav Singh Date: Sun, 7 Jun 2020 17:33:10 -0400 Subject: [PATCH] waitForPid: fix goroutine leak Signed-off-by: Gaurav Singh --- sys/oom_unix_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/oom_unix_test.go b/sys/oom_unix_test.go index dee5f81bf..9bad2db53 100644 --- a/sys/oom_unix_test.go +++ b/sys/oom_unix_test.go @@ -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