0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-25 08:19:38 +01:00
nodejs/test/parallel/test-child-process-set-blocking.js

20 lines
377 B
JavaScript
Raw Normal View History

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);
});