Skip to content

Commit

Permalink
#203: run ssh in its own session using os.setsid
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@2029 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Nov 3, 2012
1 parent dbe196d commit ef8234f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/xpra/scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,11 @@ def connect_or_fail(display_desc):
cmd = (display_desc["full_remote_xpra"]
+ ["_proxy"] + display_desc["display_as_args"])
try:
child = Popen(cmd, stdin=PIPE, stdout=PIPE)
def setsid():
#run in a new session
if os.name=="posix":
os.setsid()
child = Popen(cmd, stdin=PIPE, stdout=PIPE, preexec_fn=setsid)
except OSError, e:
sys.exit("Error running ssh program '%s': %s" % (cmd[0], e))
def abort_test(action):
Expand Down

0 comments on commit ef8234f

Please # to comment.