[virt-tools-list] [PATCH virt-manager] tunnels: do not close unowned fd
Marc-André Lureau
marcandre.lureau at redhat.com
Sun Nov 9 21:02:30 UTC 2014
The fd is handed to spice-gtk and gtk-vnc. They will close it when no
longer needed. Double closing leads to various race issues, since the
same fd may be opened for a different usage.
Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1081227
---
virtManager/sshtunnels.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/virtManager/sshtunnels.py b/virtManager/sshtunnels.py
index 8443694..2827295 100644
--- a/virtManager/sshtunnels.py
+++ b/virtManager/sshtunnels.py
@@ -153,10 +153,7 @@ class _Tunnel(object):
self.outfd and self.outfd.fileno() or self._outfds,
self.errfd and self.errfd.fileno() or self._errfds)
- if self.outfd:
- self.outfd.close()
- elif self._outfds:
- self._outfds[0].close()
+ if self._outfds:
self._outfds[1].close()
self.outfd = None
self._outfds = None
--
1.9.3
More information about the virt-tools-list
mailing list