File tree 3 files changed +7
-7
lines changed 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -605,12 +605,12 @@ function _safely_install_listener() {
605
605
rl . on ( 'SIGINT' , function ( ) {
606
606
process . emit ( 'SIGINT' ) ;
607
607
} ) ;
608
+ } else {
609
+ process . on ( 'SIGINT' , function ( ) {
610
+ process . exit ( 0 ) ;
611
+ } ) ;
608
612
}
609
613
610
- process . on ( 'SIGINT' , function ( ) {
611
- process . exit ( 0 ) ;
612
- } ) ;
613
-
614
614
process . addListener ( EVENT , function _tmp$safe_listener ( data ) {
615
615
/* istanbul ignore else */
616
616
if ( existingListeners . length ) {
Original file line number Diff line number Diff line change @@ -48,8 +48,6 @@ function _doSpawn(commandArgs, cb) {
48
48
child = spawn ( node_path , commandArgs ) ;
49
49
child . stdin . end ( ) ;
50
50
51
- // TODO we no longer support node 0.6
52
- // Cannot use 'close' event because not on node-0.6.
53
51
function _close ( ) {
54
52
var
55
53
stderr = _bufferConcat ( stderrBufs ) . toString ( ) ,
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ tmp.setGracefulCleanup();
11
11
12
12
// https://github.com/raszi/node-tmp/issues/121
13
13
module . exports = function ( signal ) {
14
+
14
15
try {
15
16
fixture . apply ( this , [ tmp . dirSync ( { unsafeCleanup : true } ) , tmp ] ) ;
16
17
}
@@ -20,7 +21,8 @@ module.exports = function (signal) {
20
21
}
21
22
22
23
// make sure that the process keeps running
23
- setTimeout ( function ( ) { } , 1000000 ) ;
24
+ setTimeout ( function ( ) { } , 10000 ) ;
24
25
26
+ // we will now end this process, triggering tmp's exit handler
25
27
this . kill ( signal ) ;
26
28
} ;
You can’t perform that action at this time.
0 commit comments