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.
This commit is contained in:
parent
8a4ed5a2e0
commit
59f667ec14
@ -314,7 +314,7 @@ export class ParentProcess extends Process {
|
|||||||
CODE_SERVER_PARENT_PID: process.pid.toString(),
|
CODE_SERVER_PARENT_PID: process.pid.toString(),
|
||||||
NODE_OPTIONS: `--max-old-space-size=2048 ${process.env.NODE_OPTIONS || ""}`,
|
NODE_OPTIONS: `--max-old-space-size=2048 ${process.env.NODE_OPTIONS || ""}`,
|
||||||
},
|
},
|
||||||
stdio: ["inherit", "inherit", "inherit", "ipc"],
|
stdio: ["pipe", "pipe", "pipe", "ipc"],
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user