[virt-tools-list] [PATCH v2 0/1] virt-viewer: add SIGINT handler
Francesco Giudici
fgiudici at redhat.com
Fri Dec 20 14:47:27 UTC 2019
Version 2: dropped windows patches (not needed) and extended comment on
the patch itself.
When remote-viewer or virt-viewer are terminated by a signal, they quit
without explicitly releasing resources. A bug[1] has been filed against
virt-viewer on linux for not releasing redirected usb devices when it's
terminated by CTRL-C.
The issue is due to the spice client detaching the auto-loaded kernel
driver and claiming the usb device. If the client is not properly
terminated it will never give the control of the device back to the
kernel, so the device will stay with no driver attached.
This could be solved by adding a signal handler doing proper shutdown of
the application.
The right way to do this is to manage the application termination in the
main event loop. This has been achieved through the self pipe trick[2].
Windows usb subsystem is different and is not affected from this issue,
so the patch address linux only.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1713311
[2] https://cr.yp.to/docs/selfpipe.html
Francesco Giudici (1):
remote-viewer: add handler for SIGINT signal
src/virt-viewer-app.c | 79 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 79 insertions(+)
--
2.21.0
More information about the virt-tools-list
mailing list