chiark / gitweb /
fishdescriptor: wip utility, before rename various variables
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 24 Oct 2017 14:22:58 +0000 (15:22 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 24 Oct 2017 14:22:58 +0000 (15:22 +0100)
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
fishdescriptor/fishdescriptor

index 074221c..bdddff2 100755 (executable)
@@ -81,8 +81,18 @@ def implmement_sockinfo(here):
 
     sock.close()
 
+def permute_fds_for_exec():
+    actual_map = { info[0]: intent for intent, info in fdmap.items }
+    for intent, (actual, tdonor, intarget) in fdmap.items():
+        if intent is not None:
+            in_way = actual_map.get(intent)
+            if in_way is not None:
+                moved = os.dup(intent)
+                actual_map[moved] = 
+
 def implement_exec(argl):
-    pass
+    if donor is not None: donor.detach()
+    
 
 def set_donor(pid):
     global donor