File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 3
3
const common = require ( '../common' ) ;
4
4
if ( common . isWindows ) {
5
5
common . skip ( 'no signals on Windows' ) ;
6
- return ;
7
6
}
8
7
9
8
const initHooks = require ( './init-hooks' ) ;
10
9
const verifyGraph = require ( './verify-graph' ) ;
11
- const exec = require ( 'child_process' ) . exec ;
10
+ const { exec } = require ( 'child_process' ) ;
12
11
13
12
const hooks = initHooks ( ) ;
14
13
15
14
hooks . enable ( ) ;
15
+ const interval = setInterval ( ( ) => { } , 9999 ) ; // keep event loop open
16
16
process . on ( 'SIGUSR2' , common . mustCall ( onsigusr2 , 2 ) ) ;
17
17
18
18
let count = 0 ;
@@ -33,7 +33,9 @@ function onsigusr2() {
33
33
}
34
34
}
35
35
36
- function onsigusr2Again ( ) { }
36
+ function onsigusr2Again ( ) {
37
+ clearInterval ( interval ) ; // let the event loop close
38
+ }
37
39
38
40
process . on ( 'exit' , onexit ) ;
39
41
You can’t perform that action at this time.
0 commit comments