Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(505)

Unified Diff: remoting/tools/me2me_virtual_host.py

Issue 8899011: Virtual Me2Me: Redirect stdin of Xsession to /dev/null. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/tools/me2me_virtual_host.py
diff --git a/remoting/tools/me2me_virtual_host.py b/remoting/tools/me2me_virtual_host.py
index 19987b2576b477f97a97436d7695815e191fd49b..5396cee9b9fb1e0669ad284db465ea6a76de3922 100755
--- a/remoting/tools/me2me_virtual_host.py
+++ b/remoting/tools/me2me_virtual_host.py
@@ -254,7 +254,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:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698