]> xenbits.xensource.com Git - libvirt.git/commit
util: Fix error return for virProcessKillPainfullyDelay()
authorJonathon Jongsma <jjongsma@redhat.com>
Fri, 22 Sep 2023 19:23:10 +0000 (14:23 -0500)
committerJonathon Jongsma <jjongsma@redhat.com>
Mon, 25 Sep 2023 20:07:59 +0000 (15:07 -0500)
commit51a074e74c6ef2fb95e6f53d41315e3f1e00be77
tree668e1c14b4b5d0be3ef397a959177fff039521e8
parent57d084febe7aeebd6e3b13f6276cb3fd2fc28c36
util: Fix error return for virProcessKillPainfullyDelay()

Commit 93af79fb removed a cleanup label in favor of returning error
values directly in certain cases. But the final return value was changed
from -1 to 0. If we get to the end of the function, that means that
we've waited for the process to exit but it still exists. So we should
return -1. The error message was still being set correctly, but we were
returning a success status (0).

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/util/virprocess.c