[PATCH v2] util: virdaemon: fix waiting for child processes

Ján Tomko jtomko at redhat.com
Wed Apr 8 12:47:26 UTC 2020

On a Wednesday in 2020, Rafael Fonseca wrote:
>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: Rafael Fonseca <r4f4rfs at gmail.com>
>Reported-by: Marcin Krol <hawk at tld-linux.org>
> src/util/virdaemon.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)

Reviewed-by: Ján Tomko <jtomko at redhat.com>
and pushed

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200408/94dd3497/attachment-0001.sig>

More information about the libvir-list mailing list