]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: virExec may blocked by reading pipe if grandchild prematurely exit
authorXu Chao <xu.chao6@zte.com.cn>
Wed, 24 Nov 2021 02:33:11 +0000 (10:33 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 24 Nov 2021 10:59:50 +0000 (11:59 +0100)
commit6fac961b085af51340246bf51205a9f2f1615962
treeba7b0747a3e63c9cc64aa953a84cdd3bc0930dd1
parentc1a85daf992ccb2498d0686c5ae4942a8d78beab
util: virExec may blocked by reading pipe if grandchild prematurely exit

When VIR_EXEC_DAEMON is set, if virPidFileAcquirePath/virSetInherit failed,
then pipesync[0] can not be closed when granchild process exit, because
pipesync[1] still opened in child process. and then saferead in child
process may blocked forever, and left grandchild process in defunct state.

Signed-off-by: Xu Chao <xu.chao6@zte.com.cn>
Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/util/vircommand.c