summaryrefslogtreecommitdiff
path: root/docker/transport/sshconn.py
diff options
context:
space:
mode:
Diffstat (limited to 'docker/transport/sshconn.py')
-rw-r--r--docker/transport/sshconn.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/docker/transport/sshconn.py b/docker/transport/sshconn.py
index 5cdaa27..7f4b2a2 100644
--- a/docker/transport/sshconn.py
+++ b/docker/transport/sshconn.py
@@ -42,12 +42,17 @@ class SSHSocket(socket.socket):
port,
'docker system dial-stdio'
]
+
+ preexec_func = None
+ if not constants.IS_WINDOWS_PLATFORM:
+ preexec_func = lambda: signal.signal(signal.SIGINT, signal.SIG_IGN)
+
self.proc = subprocess.Popen(
' '.join(args),
shell=True,
stdout=subprocess.PIPE,
stdin=subprocess.PIPE,
- preexec_fn=lambda: signal.signal(signal.SIGINT, signal.SIG_IGN))
+ preexec_fn=preexec_func)
def _write(self, data):
if not self.proc or self.proc.stdin.closed: