You are viewing a plain text version of this content. The canonical link for it is here.
Posted to tashi-commits@incubator.apache.org by st...@apache.org on 2012/02/28 00:20:05 UTC

svn commit: r1294409 - /incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py

Author: stroucki
Date: Tue Feb 28 00:20:05 2012
New Revision: 1294409

URL: http://svn.apache.org/viewvc?rev=1294409&view=rev
Log:
qemu: readlink only works on links, follow links until resolved

Modified:
    incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py

Modified: incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py?rev=1294409&r1=1294408&r2=1294409&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py (original)
+++ incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py Tue Feb 28 00:20:05 2012
@@ -132,7 +132,10 @@ class Qemu(VmControlInterface):
 	def __getHostPids(self):
 		"""Utility function to get a list of system PIDs that match the QEMU_BIN specified (/proc/nnn/exe)"""
 		pids = []
-		real_bin = os.readlink(self.QEMU_BIN)
+		real_bin = self.QEMU_BIN
+		while os.path.islink(real_bin):
+			real_bin = os.readlink(self.QEMU_BIN)
+
 		for f in os.listdir("/proc"):
 			try:
 				bin = os.readlink("/proc/%s/exe" % (f))