diff --git a/node_modules/vfs-socket/worker.js b/node_modules/vfs-socket/worker.js index 54bd7ae7..56e7add8 100644 --- a/node_modules/vfs-socket/worker.js +++ b/node_modules/vfs-socket/worker.js @@ -162,8 +162,8 @@ function Worker(vfs) { var nextStreamID = 1; function storeStream(stream) { - if (stream.id) - return { id: stream.id }; + if (stream.token) + return stream.token; nextStreamID = (nextStreamID + 1) % 10000; while (streams.hasOwnProperty(nextStreamID)) { nextStreamID = (nextStreamID + 1) % 10000; } @@ -191,6 +191,7 @@ function Worker(vfs) { remote.onClose(id); }); var token = {id: id}; + stream.token = token; if (stream.hasOwnProperty("readable")) token.readable = stream.readable; if (stream.hasOwnProperty("writable")) token.writable = stream.writable; return token; @@ -198,8 +199,8 @@ function Worker(vfs) { function storeProcess(process, onlyPid) { var pid = process.pid; - if (processes[pid]) - return onlyPid ? process.pid : { pid: process.pid }; + if (processes.token) + return onlyPid ? process.pid : process.token; processes[pid] = process; process.on("exit", function (code, signal) { @@ -221,11 +222,13 @@ function Worker(vfs) { code: code }, callback || function() {}); }; + + var token = {pid: pid}; + process.token = token; if (onlyPid) return pid; - var token = {pid: pid}; token.stdin = storeStream(process.stdin); token.stdout = storeStream(process.stdout); token.stderr = storeStream(process.stderr); diff --git a/package.json b/package.json index aa6c990d..a6e1eb0c 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "c9.ide.help.support": "#60e88f5680", "c9.ide.imgeditor": "#08bbc53578", "c9.ide.immediate": "#6845a93705", - "c9.ide.installer": "#f781a5f0e3", + "c9.ide.installer": "#2dcd0acc76", "c9.ide.mount": "#32e79866ee", "c9.ide.navigate": "#64156c7f4a", "c9.ide.newresource": "#f1f0624768",