File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -420,7 +420,7 @@ export class DenoWorker {
420420 }
421421
422422 /**
423- * Terminiates the worker and cleans up unused resources.
423+ * Terminates the worker and cleans up unused resources.
424424 */
425425 terminate ( ) {
426426 this . _terminated = true ;
Original file line number Diff line number Diff line change @@ -29,8 +29,18 @@ function killWindows(pid: number) {
2929}
3030
3131function killUnix ( pid : number ) {
32- const signal = 'SIGKILL' ;
33- process . kill ( pid , signal ) ;
32+ try {
33+ const signal = 'SIGKILL' ;
34+ process . kill ( pid , signal ) ;
35+ } catch ( e ) {
36+ // Allow this call to fail with
37+ // ESRCH, which meant that the process
38+ // to be killed was already dead.
39+ // But re-throw on other codes.
40+ if ( e . code !== 'ESRCH' ) {
41+ throw e ;
42+ }
43+ }
3444}
3545
3646export interface ExecResult {
You can’t perform that action at this time.
0 commit comments