paramiko-ng icon indicating copy to clipboard operation
paramiko-ng copied to clipboard

call setsid() in ProxyCommand subprocess

Open ploxiln opened this issue 5 years ago • 2 comments

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

ploxiln avatar Mar 28 '20 20:03 ploxiln

I think this will need to be avoided on windows where setsid() is not available.

ploxiln avatar Jul 21 '20 16:07 ploxiln

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)

ploxiln avatar Nov 27 '21 07:11 ploxiln