Conditionally wait for children after delivering signal
Conditionally wait for children after delivering signal

When signaling children and the signal is SIGKILL wait for children
otherwise conditionally wait for children which are ready to report.

This reaps all children which exited due to the signal sent without
blocking indefinitely.

Also:
* Ignore ignore ECHILD, which means the child has already gone.

Signed-off-by: Steven Hartland <995a29d8b4802c42b5fb5bf4554a0d5c9388c8af@multiplay.co.uk>

coolljt0725/runc,rajasec/runc,opencontainers/runc,stefanberger/runc,cloudfoundry-incubator/runc,adrianreber/runc,opencontainers/runc,kolyshkin/runc,WeiZhang555/runc,mikebrow/runc,rajasec/runc,dqminh/runc,xiaochenshen/runc,rhatdan/runc,cloudfoundry-incubator/runc,dqminh/runc,sunyuan3/runc,mYmNeo/runc,maxamillion/runc,vbatts/runc,xiaochenshen/runc,avagin/runc,cyphar/runc,hqhq/runc,cyphar/runc,mikebrow/runc,mYmNeo/runc,coolljt0725/runc,WeiZhang555/runc,rhatdan/runc,xiaochenshen/runc,cyphar/runc,crosbymichael/runc,docker/runc,opencontainers/runc,rhatdan/runc,avagin/runc,laijs/runc,hqhq/runc,crosbymichael/runc,stefanberger/runc,justincormack/runc,kolyshkin/runc,mheon/runc,mheon/runc,shishir-a412ed/runc,hqhq/runc,cloudfoundry-incubator/runc,sunyuan3/runc,maxamillion/runc,WeiZhang555/runc,dqminh/runc,dqminh/runc,maxamillion/runc,sunyuan3/runc,estesp/runc,mikebrow/runc,rajasec/runc,opencontainers/runc,estesp/runc,mYmNeo/runc,estesp/runc,kolyshkin/runc,laijs/runc,wking/runc,docker/runc,rhatdan/runc,wking/runc,shishir-a412ed/runc,coolljt0725/runc,laijs/runc,vbatts/runc,justincormack/runc,vbatts/runc,wking/runc,justincormack/runc,kolyshkin/runc,mheon/runc,adrianreber/runc,avagin/runc,crosbymichael/runc,stefanberger/runc,docker/runc,adrianreber/runc,shishir-a412ed/runc