summaryrefslogtreecommitdiff
path: root/test/parallel/test-stdin-pause-resume.js
blob: a07bf1327d27746b89a1ff277786b200086ee9b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
'use strict';
require('../common');
console.error('before opening stdin');
process.stdin.resume();
console.error('stdin opened');
setTimeout(function() {
  console.error('pausing stdin');
  process.stdin.pause();
  setTimeout(function() {
    console.error('opening again');
    process.stdin.resume();
    setTimeout(function() {
      console.error('pausing again');
      process.stdin.pause();
      console.error('should exit now');
    }, 1);
  }, 1);
}, 1);