mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 06:47:45 +00:00
9f6749dea0
And make callers check the return value as well. This helps error out early for invalid environment variables. That is desirable because it could lead to deadlocks. This can happen when resetting logging after fork() reports translated errors because gettext functions are not reentrant. Well, it is not limited to resetting logging after fork(), it can be any translation at that phase, but parsing environment variables is easy to make fail on purpose to show the result, it can also happen just due to a typo. Before this commit it is possible to deadlock the daemon on startup with something like: LIBVIRT_LOG_FILTERS='1:*' LIBVIRT_LOG_OUTPUTS=1:stdout libvirtd where filters are used to enable more logging and hence make the race less rare and outputs are set to invalid Combined with the previous patches this changes the following from: ... <deadlock> to: ... libvirtd: initialisation failed The error message is improved in future commits and is also possible thanks to this patch. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com> |
||
---|---|---|
.. | ||
admin_protocol.x | ||
admin_remote.c | ||
admin_server_dispatch.c | ||
admin_server_dispatch.h | ||
admin_server.c | ||
admin_server.h | ||
libvirt_admin_private.syms | ||
libvirt_admin_public.syms | ||
libvirt-admin.c | ||
libvirt-admin.conf | ||
meson.build |