X Tutup
Skip to content

Commit ae08491

Browse files
committed
waitForPid: fix goroutine leak
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
1 parent 38cb1c1 commit ae08491

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sys/oom_unix_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func adjustOom(adjustment int) (int, error) {
8787
}
8888

8989
func waitForPid(process *os.Process) (int, error) {
90-
c := make(chan int)
90+
c := make(chan int, 1)
9191
go func() {
9292
for {
9393
pid := process.Pid

0 commit comments

Comments
 (0)
X Tutup