The aim of virProcessAbort() is to reap a child process. It does
so by waitpid()-ing and possibly sending SIGTERM/SIGKILL to the
child process (and waitpid()-ing again). Nevertheless, if
everything fails a debug message is printed. But the message
mentions only the PID and not errno (set by previous waitpid())
which may be useful. For instance when virProcessAbort() is
called over a PID that's not our child:
failed to reap child 16325, abandoning it: No child processes
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
}
}
}
- VIR_DEBUG("failed to reap child %lld, abandoning it", (long long) pid);
+ VIR_DEBUG("failed to reap child %lld, abandoning it: %s",
+ (long long) pid, g_strerror(errno));
cleanup:
errno = saved_errno;