chiark / gitweb /
fishdescriptor: Actually tidy up actual2intended when closing
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 7 Jun 2018 16:43:42 +0000 (17:43 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 7 Jun 2018 16:45:24 +0000 (17:45 +0100)
Otherwise we will probably try to move the new-defunct open-file
somewhere when we try to make the descriptor refer to the intended
open-file.

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

index d583533c210faf64d351f1536af350fceafe887c..8955b462aae647e42dca30e1d65ece76069260fe 100755 (executable)
@@ -129,6 +129,7 @@ def permute_fds_for_exec():
                 fdmap[inway_intended][0] = inway_moved
             os.dup2(actual, intended)
         os.close(actual)
                 fdmap[inway_intended][0] = inway_moved
             os.dup2(actual, intended)
         os.close(actual)
+        del actual2intended[actual]
 
 def implement_exec(argl):
     if donor is not None: donor.detach()
 
 def implement_exec(argl):
     if donor is not None: donor.detach()