Merge pull request #430 from docker/fix_flaky_signal_fwd

Fix flaky nil pointer in signal forwarding to child process
This commit is contained in:
Guillaume Tardif 2020-08-06 11:57:57 +02:00 committed by GitHub
commit e686de589d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,6 +69,9 @@ func Exec() {
for {
select {
case sig := <-signals:
if cmd.Process == nil {
continue // can happen if receiving signal before the process is actually started
}
err := cmd.Process.Signal(sig)
if err != nil {
fmt.Printf("WARNING could not forward signal %s to %s : %s\n", sig.String(), ComDockerCli, err.Error())