]> git.ipfire.org Git - thirdparty/libvirt.git/commit
bhyve: drop virProcessKillPainfully() from destroy
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Wed, 4 May 2016 16:41:58 +0000 (19:41 +0300)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Thu, 5 May 2016 05:01:19 +0000 (08:01 +0300)
commitc35c2fe78eb05f9becf848393912e0d7ded70da2
tree3866690d0053eb24e46b3fcec98982961f0bbfa1
parenta4ef8057588600007d33d20544f13a16de93da11
bhyve: drop virProcessKillPainfully() from destroy

Current implementation of domainDestroy for bhyve calls
virProcessKillPainfully() for the bhyve process and then
executes "bhyvectl --destroy".

This is wrong for two reasons:

 * bhyvectl --destroy alone is sufficient because it terminates
   the process
 * virProcessKillPainfully() first sends SIGTERM and after few
   attempts sends SIGKILL. As SIGTERM triggers ACPI shutdown that
   we're not interested in, it creates an unwanted side effect in
   domainDestroy.

Also, destroy monitor only after "bhyvectl --destroy" command succeeded
to avoid a case when the command fails and domain remains running, but
not being monitored anymore.
src/bhyve/bhyve_process.c