Skip to content

@loontail/minecraft-kit / SpawnedProcess

Type Alias: SpawnedProcess

ts
type SpawnedProcess = {
  exited: Promise<{
     code: number | null;
     signal: NodeJS.Signals | null;
  }>;
  pid: number;
  stderr: ProcessStream;
  stdout: ProcessStream;
  kill: boolean;
};

Defined in: src/types/spawner.ts:11

Live handle for a child process.

Properties

PropertyModifierTypeDescriptionDefined in
exitedreadonlyPromise<{ code: number | null; signal: NodeJS.Signals | null; }>Resolves when the process exits with its exit info. Remarks Implementations MUST also settle this promise when the process could not be spawned at all, by rejecting with a MinecraftKitError whose code is LAUNCH_JAVA_NOT_FOUND (binary missing) or LAUNCH_PROCESS_FAILED (any other spawn failure). Leaving it pending hangs launch.run and the Forge processor stage forever.src/types/spawner.ts:24
pidreadonlynumber-src/types/spawner.ts:12
stderrreadonlyProcessStream-src/types/spawner.ts:14
stdoutreadonlyProcessStream-src/types/spawner.ts:13

Methods

kill()

ts
kill(signal?): boolean;

Defined in: src/types/spawner.ts:29

Send a termination signal. Returns true on success.

Parameters

ParameterType
signal?Signals

Returns

boolean

MIT License