MCPcopy Create free account
hub / github.com/Athena-AI-Lab/athena-core / constructor

Method constructor

src/plugins/shell/shell-process.ts:10–24  ·  view source on GitHub ↗
(command: string)

Source from the content-addressed store, hash-verified

8 boundStdoutHandler: (data: string) => void = this.stdoutHandler.bind(this);
9
10 constructor(command: string) {
11 super();
12 this.child = spawn(command, { shell: true });
13 this.child.stdout?.on("data", this.boundStdoutHandler);
14 this.child.stderr?.on("data", this.boundStdoutHandler);
15 this.child.once("close", (code) => {
16 if (this.stdoutTimeout) {
17 clearTimeout(this.stdoutTimeout);
18 }
19 this.child.stdout?.off("data", this.boundStdoutHandler);
20 this.child.stderr?.off("data", this.boundStdoutHandler);
21 this.kill();
22 this.emit("close", code);
23 });
24 }
25
26 get pid(): number {
27 return this.child.pid!;

Callers

nothing calls this directly

Calls 1

killMethod · 0.95

Tested by

no test coverage detected