MCPcopy Create free account
hub / github.com/Noumena-Network/code / shutdown

Method shutdown

src/tools/REPLTool/pyReplFactory.tsx:502–521  ·  view source on GitHub ↗
(reason: string)

Source from the content-addressed store, hash-verified

500 }
501
502 private shutdown(reason: string): void {
503 const error = new Error(
504 this.stderrTail.length > 0
505 ? `${reason}\n${this.stderrTail.join(' | ')}`
506 : reason,
507 )
508
509 for (const pending of this.pendingExecs.values()) {
510 pending.reject(error)
511 }
512 this.pendingExecs.clear()
513
514 this.stdoutReader?.close()
515 this.stdoutReader = null
516
517 if (this.child && this.child.exitCode === null && !this.child.killed) {
518 this.child.kill()
519 }
520 this.child = null
521 }
522}
523
524function getOrCreatePythonReplManager(

Callers 2

resetMethod · 0.95
handleExitMethod · 0.95

Calls 4

rejectMethod · 0.80
clearMethod · 0.45
closeMethod · 0.45
killMethod · 0.45

Tested by

no test coverage detected