hyperhq / runv

Hypervisor-based Runtime for OCI
Apache License 2.0
828 stars 129 forks source link

remove global SIGCHILD handler to avoid conflicts #430

Closed pmorjan closed 7 years ago

pmorjan commented 7 years ago

Executing Qemu via cmd.Run() installs it's own SIG handler to wait until Qemu has become a daemon. Under certain conditions the global SIGCHILD handler in containerd.go catches the SIGCHILD from the qemu process and the process is gone. Later on in /usr/local/go/src/os/wait_waitid.go the syscall SYS_WAITID triggerd by cmd.Run() also starts waiting for the process to become waitable but panics with 'waitid: no child processes'. This patch removes the global SIGCHILD handler.

Signed-off-by: Peter Morjan peter.morjan@de.ibm.com