@orkestrel/process 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/src/server/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { spawn, spawnSync } from "node:child_process";
|
|
|
3
3
|
import { statSync } from "node:fs";
|
|
4
4
|
import { join, posix, win32 } from "node:path";
|
|
5
5
|
import { platform } from "node:process";
|
|
6
|
-
import { boundsOf, holds, isNonEmptyString, isNonNegativeInteger, isString } from "@orkestrel/contract";
|
|
6
|
+
import { boundsOf, holds, isError, isNonEmptyString, isNonNegativeInteger, isString } from "@orkestrel/contract";
|
|
7
7
|
import { PROCESS_BACKLOG, PROCESS_CONFIRMATION, PROCESS_DRAIN, PROCESS_EVIDENCE, PROCESS_GRACE, PROCESS_OUTPUT, PROCESS_PATHEXT, PROCESS_TIMER, ProcessError, createDuplicateError, createExecuteError, createInvalidError, createProtocolError } from "../core/index.js";
|
|
8
8
|
import { createInterface } from "node:readline";
|
|
9
9
|
import { Emitter } from "@orkestrel/emitter";
|
|
@@ -579,7 +579,7 @@ function killProcess(child, signal) {
|
|
|
579
579
|
}
|
|
580
580
|
process.kill(-child.pid, signal);
|
|
581
581
|
} catch (error) {
|
|
582
|
-
if (error
|
|
582
|
+
if (isError(error) && "code" in error && error.code === "ESRCH") {
|
|
583
583
|
holds(() => child.kill(signal));
|
|
584
584
|
return;
|
|
585
585
|
}
|
|
@@ -1854,7 +1854,7 @@ var ProcessManager = class {
|
|
|
1854
1854
|
}
|
|
1855
1855
|
stop(target) {
|
|
1856
1856
|
if (target === void 0) return this.#stopAll();
|
|
1857
|
-
if (
|
|
1857
|
+
if (isString(target)) return this.#stopOne(target);
|
|
1858
1858
|
return this.#stopMany(target);
|
|
1859
1859
|
}
|
|
1860
1860
|
/**
|