mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-11 04:00:38 +00:00
fix(code-runtime-python): guard the stdin destroy against a spawn-failure child
The boot-write-failure path's fake child carries no stdin handle, so the unconditional destroy threw inside the spawn error handler and mislabeled the worker-exit. Use the optional-call form; the no-stdin branch is exercised by that same test.
This commit is contained in:
@@ -995,7 +995,7 @@ export class PythonCodeRuntime extends CodeRuntime {
|
||||
// inheriting fd 0 would keep the host process from exiting even after the
|
||||
// closeDeadline forced settlement. The child (and any descendant) reads
|
||||
// EOF on fd 0 instead, and no host handle survives.
|
||||
child.stdin.destroy()
|
||||
child.stdin?.destroy()
|
||||
} catch (error: unknown) {
|
||||
try {
|
||||
rmSync(bootstrapDir, { recursive: true, force: true })
|
||||
|
||||
Reference in New Issue
Block a user