server: worker pid cleanup

This commit is contained in:
Koushik Dutta
2024-08-04 00:28:42 -07:00
parent 0a6114cc60
commit b7980b7cbf
3 changed files with 1 additions and 9 deletions

View File

@@ -18,7 +18,7 @@ export abstract class ChildProcessWorker extends EventEmitter implements Runtime
}
get pid() {
return this.worker.pid;
return this.worker?.pid;
}
get stdout() {

View File

@@ -80,8 +80,4 @@ export class DenoWorker extends ChildProcessWorker {
reject?.(e);
}
}
get pid() {
return this.worker?.pid;
}
}

View File

@@ -33,10 +33,6 @@ export class PythonRuntimeWorker extends ChildProcessWorker {
_stderr = new PassThrough();
pythonInstallationComplete = true;
get pid() {
return this.worker?.pid || -1;
}
get stdout() {
return this._stdout;
}