waitForPid: fix goroutine leak
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
This commit is contained in:
parent
38cb1c1a54
commit
ae08491bff
@ -87,7 +87,7 @@ func adjustOom(adjustment int) (int, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func waitForPid(process *os.Process) (int, error) {
|
func waitForPid(process *os.Process) (int, error) {
|
||||||
c := make(chan int)
|
c := make(chan int, 1)
|
||||||
go func() {
|
go func() {
|
||||||
for {
|
for {
|
||||||
pid := process.Pid
|
pid := process.Pid
|
||||||
|
Loading…
Reference in New Issue
Block a user