mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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 <berrange@redhat.com>
This commit is contained in:
parent
381a339e98
commit
84912e9c91
@ -267,8 +267,15 @@ virProcessKillPainfully(pid_t pid, bool force)
|
|||||||
} else if ((i == 50) & force) {
|
} else if ((i == 50) & force) {
|
||||||
VIR_DEBUG("Timed out waiting after SIGTERM to process %d, "
|
VIR_DEBUG("Timed out waiting after SIGTERM to process %d, "
|
||||||
"sending SIGKILL", pid);
|
"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 */
|
signum = SIGKILL; /* kill it after a grace period */
|
||||||
signame = "KILL";
|
signame = "KILL";
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
signum = 0; /* Just check for existence */
|
signum = 0; /* Just check for existence */
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user