Skip to content

Commit 3a383df

Browse files
committed
Fix ssh-agent shutdown on terminal close
With Python 3.2 the default value for close_fds changed from True to False. Therefore ssh-agent inherits the file descriptors to /dev/tty from ssh-ident. At least on Cygwin this causes ssh-agent to shut down when the terminal is closed. Signed-off-by: Konrad Gräfe <[email protected]>
1 parent fbdcc65 commit 3a383df

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ssh-ident

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,9 @@ class AgentManager(object):
796796
print("Preparing new agent for identity {0}".format(identity), file=sys.stderr,
797797
loglevel=LOG_DEBUG)
798798
retval = subprocess.call(
799-
["/usr/bin/env", "-i", "/bin/sh", "-c", "ssh-agent > {0}".format(agentfile)])
799+
["/usr/bin/env", "-i", "/bin/sh", "-c", "ssh-agent > {0}".format(agentfile)],
800+
close_fds=True
801+
)
800802
return agentfile
801803

802804
@staticmethod

0 commit comments

Comments
 (0)