From ddd3ca6ff7720b0d0d3a4e8ef30526626ba27774 Mon Sep 17 00:00:00 2001 From: Anael Beutot Date: Tue, 27 Nov 2012 17:29:51 +0100 Subject: [PATCH] Launch vnc viewer process in a new process group So that when we send a SIGINT to the cli, it is not also sent by the terminal to the child process and thus terminating it. --- cccli/commands/vnc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cccli/commands/vnc.py b/cccli/commands/vnc.py index 0f9fc13..29f0a73 100644 --- a/cccli/commands/vnc.py +++ b/cccli/commands/vnc.py @@ -54,6 +54,7 @@ class VNCViewer(threading.Thread): proc = subprocess.Popen("%s '%s::%s'" % (self.viewer, fwd.source_ip, fwd.source_port), + preexec_fn=os.setpgrp, shell=True, close_fds=True, stdin=onull, stdout=onull, stderr=onull) proc.wait() -- GitLab