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

Unified Diff: build_tools/naclprocess.js

Issue 1742043002: Make M-x shell work in emacs. (Closed) Base URL: https://chromium.googlesource.com/webports.git@master
Patch Set: fix Created 4 years, 10 months 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 | build_tools/pipeserver.js » ('j') | build_tools/pipeserver.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build_tools/naclprocess.js
diff --git a/build_tools/naclprocess.js b/build_tools/naclprocess.js
index f522fff2cf5dd0ece2a85e1498b7ad9a7889b730..0dd167af62b4d6359dbd338c2431e34ffa2cfcff 100644
--- a/build_tools/naclprocess.js
+++ b/build_tools/naclprocess.js
@@ -1156,7 +1156,6 @@ NaClProcessManager.prototype.spawn = function (
}
var fg = document.createElement('object');
- self.foregroundProcess = fg;
var ppid;
if (pid === -1) {
@@ -1303,7 +1302,14 @@ NaClProcessManager.prototype.spawn = function (
});
}
- self.pipeServer.addProcessPipes(fg.pid, params);
+ // Add in process pipes, and only make the foreground process if started
+ // by the current foreground process and not piped somewhere else.
+ var routesStdin = self.pipeServer.addProcessPipes(fg.pid, params);
+ if (!routesStdin &&
+ (self.foregroundProcess === null ||
+ self.foregroundProcess == parent)) {
+ self.foregroundProcess = fg;
+ }
if (params[NaClProcessManager.ENV_SPAWN_MODE] ===
NaClProcessManager.ENV_SPAWN_POPUP_VALUE) {
« no previous file with comments | « no previous file | build_tools/pipeserver.js » ('j') | build_tools/pipeserver.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698