Skip to content

Commit ca7d868

Browse files
committed
fix: catch -1
1 parent 2097ea7 commit ca7d868

File tree

1 file changed

+2
-2
lines changed
  • packages/core/src/runtime/worker

1 file changed

+2
-2
lines changed

packages/core/src/runtime/worker/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,8 @@ const runInPool = async (
276276
};
277277

278278
const kill = process.kill.bind(process);
279-
process.kill = (pid, signal) => {
280-
if (pid === process.pid) {
279+
process.kill = (pid: number, signal?: NodeJS.Signals) => {
280+
if (pid === -1 || Math.abs(pid) === process.pid) {
281281
throw new Error(
282282
`process.kill unexpectedly called with "${pid}" and "${signal}"`,
283283
);

0 commit comments

Comments
 (0)