Skip to content

Commit 59f667e

Browse files
authored
Fix: use pipe to spawn child process to re-enable file logging (#4293)
We pipe the child's stdout and stderr to the log file (and to the parent's streams) but since we used `inherit` for `stdio` this caused the child to use the parent's streams directly which made `child.stdout` and `child.stderr` non-existent and thus we had no file logging. Using `pipe` creates stdin and stderr on the child.
1 parent 8a4ed5a commit 59f667e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node/wrapper.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ export class ParentProcess extends Process {
314314
CODE_SERVER_PARENT_PID: process.pid.toString(),
315315
NODE_OPTIONS: `--max-old-space-size=2048 ${process.env.NODE_OPTIONS || ""}`,
316316
},
317-
stdio: ["inherit", "inherit", "inherit", "ipc"],
317+
stdio: ["pipe", "pipe", "pipe", "ipc"],
318318
})
319319
}
320320

0 commit comments

Comments
 (0)