chiark / gitweb /
fishdescriptor: wip utility, before rename various variables
[chiark-utils.git] / fishdescriptor / fishdescriptor
index 074221c367f312b175858065719c70ea01fd1f22..bdddff2a12e380a97971669a76b3603c10b61f89 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