chiark / gitweb /
fishdescriptor: Fix a tuple bug in fd permutation
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 11 May 2018 15:59:05 +0000 (16:59 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 7 Jun 2018 16:28:49 +0000 (17:28 +0100)
The fd permutation algorithm would fail in nontrivial cases because it
tries to update individual members of the tupes in the fdmap.  That is
not permitted in Python.  Make the tuples into lists.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
fishdescriptor/fishdescriptor

index 77e9e680b4d72cc176c65b5016b8a3b14bfdede2..d583533c210faf64d351f1536af350fceafe887c 100755 (executable)
@@ -62,7 +62,7 @@ def implement_pending():
     for (nominal, there), actual in zip(pending, actuals):
         overwriting_info = fdmap.get(nominal)
         if overwriting_info is not None: os.close(overwriting_info[0])
-        fdmap[nominal] = (actual, donor, there)
+        fdmap[nominal] = [actual, donor, there]
 
 def implement_sockinfo(nominal):
     (actual, tdonor, there) = fdmap[nominal]