From 84912e9c919a7339952daa01806c0fc5ab9fc989 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Tue, 16 Oct 2012 15:46:12 +0100 Subject: [PATCH] Fix virProcessKillPainfully on Win32 Win32 platforms don't have SIGKILL defined, but they do have SIGABRT. Since our virProcess wrapper treats anything which isn't SIGTERM/SIGINT as equivalent to SIGKILL, just use SIGABRT on Win32. Signed-off-by: Daniel P. Berrange --- src/util/virprocess.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/util/virprocess.c b/src/util/virprocess.c index c70aa58dbb..fee333f64d 100644 --- a/src/util/virprocess.c +++ b/src/util/virprocess.c @@ -267,8 +267,15 @@ virProcessKillPainfully(pid_t pid, bool force) } else if ((i == 50) & force) { VIR_DEBUG("Timed out waiting after SIGTERM to process %d, " "sending SIGKILL", pid); + /* No SIGKILL kill on Win32 ! Use SIGABRT instead which our + * virProcessKill proc will handle more or less lik SIGKILL */ +#ifdef WIN32 + signum = SIGABRT; /* kill it after a grace period */ + signame = "ABRT"; +#else signum = SIGKILL; /* kill it after a grace period */ signame = "KILL"; +#endif } else { signum = 0; /* Just check for existence */ } -- GitLab