Skip to content

Commit 6991187

Browse files
committed
Use fork instead of spawn
We no longer do in-place updating so no need for the spawn. The advantage of a fork is that it preserves flags like --prof which you can use to profile code-server. Also I am not sure that comment was even true to begin with.
1 parent d1acfad commit 6991187

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/node/wrapper.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,7 @@ export class ParentProcess extends Process {
317317
}
318318

319319
private spawn(): cp.ChildProcess {
320-
// Use spawn (instead of fork) to use the new binary in case it was updated.
321-
return cp.spawn(process.argv[0], process.argv.slice(1), {
320+
return cp.fork(path.join(__dirname, "entry"), {
322321
env: {
323322
...process.env,
324323
CODE_SERVER_PARENT_PID: process.pid.toString(),

0 commit comments

Comments
 (0)