mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
event-test: Check for virConnectRegisterCloseCallback return value
In an unlikely event of virConnectRegisterCloseCallback failing, the error is ignored. This is an example file and we shouldn't get a bad example. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
bde75a895d
commit
cbe289d814
@ -668,8 +668,11 @@ int main(int argc, char **argv)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
virConnectRegisterCloseCallback(dconn,
|
if (virConnectRegisterCloseCallback(dconn,
|
||||||
connectClose, NULL, NULL);
|
connectClose, NULL, NULL) < 0) {
|
||||||
|
fprintf(stderr, "Unable to register close callback\n");
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
sigaction(SIGTERM, &action_stop, NULL);
|
sigaction(SIGTERM, &action_stop, NULL);
|
||||||
sigaction(SIGINT, &action_stop, NULL);
|
sigaction(SIGINT, &action_stop, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user