chiark / gitweb /
fishdescriptor: bugfixes
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 24 Oct 2017 16:23:32 +0000 (17:23 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 24 Oct 2017 16:23:32 +0000 (17:23 +0100)
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
fishdescriptor/fishdescriptor

index 703717c45b46ceee1406f83d9077cf88a8508edc..dc1776207d55e62b99acf91f652bc0d46e452d4a 100755 (executable)
@@ -6,6 +6,7 @@ import optparse
 import re
 import subprocess
 import socket
 import re
 import subprocess
 import socket
+import os
 
 donor = None
 
 
 donor = None
 
@@ -82,7 +83,7 @@ def implement_sockinfo(nominal):
     sock.close()
 
 def permute_fds_for_exec():
     sock.close()
 
 def permute_fds_for_exec():
-    actual2intended = { info[0]: nominal for nominal, info in fdmap.items }
+    actual2intended = { info[0]: nominal for nominal, info in fdmap.items() }
     # invariant at the start of each loop iteration:
     #     for each intended (aka `nominal') we have processed:
     #         relevant open-file is only held in fd intended
     # invariant at the start of each loop iteration:
     #     for each intended (aka `nominal') we have processed:
     #         relevant open-file is only held in fd intended
@@ -110,7 +111,7 @@ def permute_fds_for_exec():
 def implement_exec(argl):
     if donor is not None: donor.detach()
     sys.stdout.flush()
 def implement_exec(argl):
     if donor is not None: donor.detach()
     sys.stdout.flush()
-    permut_fds_for_exec()
+    permute_fds_for_exec()
     os.execvp(argl[0], argl)
 
 def set_donor(pid):
     os.execvp(argl[0], argl)
 
 def set_donor(pid):