Skip to content
Snippets Groups Projects
Commit 2c6a10dc authored by Christian Pointner's avatar Christian Pointner
Browse files

zombie reaping

parent 8ee57655
No related branches found
No related tags found
No related merge requests found
......@@ -105,6 +105,8 @@ func (job *Job) fetch() error {
job.im.errLog.Printf("fetch(): creating fetch converter failed: %v", err)
return err
}
// from here on conv.Close() and conv.Wait() has to be called in any case to
// reap potential child process zombies
done := make(chan copyResult)
go func() {
......@@ -128,6 +130,7 @@ func (job *Job) fetch() error {
select {
case <-job.ctx.Done():
conv.Close()
go conv.Wait() // do the zombie reaping in seperate go routine since we are not interested in the result anyway
err = job.ctx.Err()
job.source.done <- &JobSourceResult{Err: err}
return err
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment