mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-16 18:25:08 -06:00
util: Make sure virExec hook failures are raised
With the introduction virDispatchError, hook function errors are never sent through the error callback, so users will never see these messages. Fix this by calling virDispatchError after hook failure.
This commit is contained in:
parent
5073aa994a
commit
522776ed4c
@ -557,8 +557,11 @@ __virExec(virConnectPtr conn,
|
||||
}
|
||||
|
||||
if (hook)
|
||||
if ((hook)(data) != 0)
|
||||
if ((hook)(data) != 0) {
|
||||
VIR_DEBUG0("Hook function failed.");
|
||||
virDispatchError(NULL);
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
/* The steps above may need todo something privileged, so
|
||||
* we delay clearing capabilities until the last minute */
|
||||
|
Loading…
Reference in New Issue
Block a user