Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-child-process-set-blocking.js « parallel « test - github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: af831b720b2eb00a18f6f8a97c6715aba7ed302b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
var common = require('../common');
var assert = require('assert');
var ch = require('child_process');

var SIZE = 100000;
var childGone = false;

var cp = ch.spawn('python', ['-c', 'print ' + SIZE + ' * "C"'], {
  stdio: 'inherit'
});

cp.on('exit', function(code) {
  childGone = true;
  assert.equal(0, code);
});

process.on('exit', function() {
  assert.ok(childGone);
});