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 d583533..8955b46 100755 (executable)
@@ -129,6 +129,7 @@ def permute_fds_for_exec():
                 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()