Skip to content

Commit a642dae

Browse files
author
Benjamin Pasero
authored
process.stdout.write in Extension Host does nothing (fix microsoft#74173) (microsoft#83833)
1 parent faa9850 commit a642dae

1 file changed

Lines changed: 1 addition & 20 deletions

File tree

src/bootstrap-fork.js

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ if (!!process.send && process.env.PIPE_LOGGING === 'true') {
2020
pipeLoggingToParent();
2121
}
2222

23-
// Disable IO if configured
24-
if (!process.env['VSCODE_ALLOW_IO']) {
25-
disableSTDIO();
26-
}
27-
2823
// Handle Exceptions
2924
if (!process.env['VSCODE_HANDLES_UNCAUGHT_ERRORS']) {
3025
handleExceptions();
@@ -141,20 +136,6 @@ function pipeLoggingToParent() {
141136
console.error = function () { safeSend({ type: '__$console', severity: 'error', arguments: safeToArray(arguments) }); };
142137
}
143138

144-
function disableSTDIO() {
145-
146-
// const stdout, stderr and stdin be no-op streams. This prevents an issue where we would get an EBADF
147-
// error when we are inside a forked process and this process tries to access those channels.
148-
const stream = require('stream');
149-
const writable = new stream.Writable({
150-
write: function () { /* No OP */ }
151-
});
152-
153-
process['__defineGetter__']('stdout', function () { return writable; });
154-
process['__defineGetter__']('stderr', function () { return writable; });
155-
process['__defineGetter__']('stdin', function () { return writable; });
156-
}
157-
158139
function handleExceptions() {
159140

160141
// Handle uncaught exceptions
@@ -198,4 +179,4 @@ function configureCrashReporter() {
198179
}
199180
}
200181

201-
//#endregion
182+
//#endregion

0 commit comments

Comments
 (0)