File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
packages/npm/@amazeelabs/publisher/src/mode-local/tools Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { run } from './runner';
6
6
7
7
// There are 3 attempts to kill a process using different signals. Each attempt
8
8
// is limited to 1 second.
9
- const maxKillTimeMs = 4000 ;
9
+ const maxKillTimeMs = 15000 ;
10
10
11
11
const controller = new TaskController ( ) ;
12
12
Original file line number Diff line number Diff line change @@ -97,9 +97,13 @@ export const run = (options: {
97
97
const signal = signals . shift ( ) ! ;
98
98
killSignal = signal ;
99
99
try {
100
- await terminate ( process . pid , signal , { timeout : 1000 } ) ;
100
+ await terminate ( process . pid , signal , { timeout : 5000 } ) ;
101
101
return ;
102
102
} catch ( error ) {
103
+ if ( ( error as NodeJS . ErrnoException ) . code === 'ESRCH' ) {
104
+ // Process already exited.
105
+ return ;
106
+ }
103
107
console . log ( 'An attempt to kill the process failed:' , {
104
108
command : options . command ,
105
109
signal,
You can’t perform that action at this time.
0 commit comments