summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorlambroslambrou@google.com <lambroslambrou@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-13 18:41:27 +0000
committerlambroslambrou@google.com <lambroslambrou@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-13 18:41:27 +0000
commit28b5a225f4d8fcdcae12e58c5748d03fb057d161 (patch)
treed4d7567ef9f220ec11a51df1b3ab5dae099274d3 /remoting
parent8e1f93e8a83ba3a2d84f00a5d8026cd5ba494214 (diff)
downloadchromium_src-28b5a225f4d8fcdcae12e58c5748d03fb057d161.zip
chromium_src-28b5a225f4d8fcdcae12e58c5748d03fb057d161.tar.gz
chromium_src-28b5a225f4d8fcdcae12e58c5748d03fb057d161.tar.bz2
Virtual Me2Me: Redirect stdin of Xsession to /dev/null.
This fixes the problem of the Me2Me process being stopped when running as a shell background job. BUG=106935 TEST=Follow repro steps Review URL: http://codereview.chromium.org/8899011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114238 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rwxr-xr-xremoting/tools/me2me_virtual_host.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/remoting/tools/me2me_virtual_host.py b/remoting/tools/me2me_virtual_host.py
index 7a95672..64d6027 100755
--- a/remoting/tools/me2me_virtual_host.py
+++ b/remoting/tools/me2me_virtual_host.py
@@ -258,7 +258,13 @@ class Desktop:
def launch_x_session(self):
# Start desktop session
+ # The /dev/null input redirection is necessary to prevent Xsession from
+ # reading from stdin. If this code runs as a shell background job in a
+ # terminal, any reading from stdin causes the job to be suspended.
+ # Daemonization would solve this problem by separating the process from the
+ # controlling terminal.
session_proc = subprocess.Popen("/etc/X11/Xsession",
+ stdin=open("/dev/null", "r"),
cwd=os.environ["HOME"],
env=self.child_env)
if not session_proc.pid: