util: virdaemon: fix waiting for child processes
Unlike `waitpid`, `virProcessWait` only returns -1 (error) or 0 (success), so comparing that to `pid` will always be false and the parent will report failure with: error : main:851 : Failed to fork as daemon: No such file or directory even though the grandchild process is succesfully running. Note that the errno message is misleading: it was last set when trying to find a restart state file. Signed-off-by: NRafael Fonseca <r4f4rfs@gmail.com> Reported-by: NMarcin Krol <hawk@tld-linux.org> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com> (cherry-picked from commit a87e4788) Signed-off-by: NXu Yandong <xuyandong2@huawei.com>
Showing
想要评论请 注册 或 登录