提交 522776ed 编写于 作者: C Cole Robinson

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.
上级 5073aa99
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册