paramiko-ng
paramiko-ng copied to clipboard
call setsid() in ProxyCommand subprocess
so that signals sent to the foreground process group are not also received by the ProxyCommand (it should be closed by the transport when the parent shuts down)
inspired by https://github.com/paramiko/paramiko/pull/1183
I think this will need to be avoided on windows where setsid() is not available.
I'm now thinking that maybe this should be optional anyway, maybe not all ProxyCommands should use setsid(). Also, since Python-3.2:
if start_new_session is true the setsid() system call will be made in the child process prior to the execution of the subprocess. (POSIX only)