Skip to content

Commit 9474cfb

Browse files
authored
Merge pull request #1644 from AmazeeLabs/SLB-549--publisher-improvements-7
Publisher improvements 7
2 parents c8e4d25 + eb7a44e commit 9474cfb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/npm/@amazeelabs/publisher/src/mode-local/tools/runner.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { run } from './runner';
66

77
// There are 3 attempts to kill a process using different signals. Each attempt
88
// is limited to 1 second.
9-
const maxKillTimeMs = 4000;
9+
const maxKillTimeMs = 15000;
1010

1111
const controller = new TaskController();
1212

packages/npm/@amazeelabs/publisher/src/mode-local/tools/runner.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,13 @@ export const run = (options: {
9797
const signal = signals.shift()!;
9898
killSignal = signal;
9999
try {
100-
await terminate(process.pid, signal, { timeout: 1000 });
100+
await terminate(process.pid, signal, { timeout: 5000 });
101101
return;
102102
} catch (error) {
103+
if ((error as NodeJS.ErrnoException).code === 'ESRCH') {
104+
// Process already exited.
105+
return;
106+
}
103107
console.log('An attempt to kill the process failed:', {
104108
command: options.command,
105109
signal,

0 commit comments

Comments
 (0)