2011-09-16 00:29:32 +02:00
|
|
|
var common = require('../common');
|
|
|
|
var assert = require('assert');
|
2011-10-05 00:08:18 +02:00
|
|
|
var ch = require('child_process');
|
2011-09-16 00:29:32 +02:00
|
|
|
|
2011-10-05 00:08:18 +02:00
|
|
|
var SIZE = 100000;
|
2011-09-16 00:29:32 +02:00
|
|
|
var childGone = false;
|
|
|
|
|
2011-10-05 00:08:18 +02:00
|
|
|
var cp = ch.spawn('python', ['-c', 'print ' + SIZE + ' * "C"'], {
|
2014-07-08 21:14:58 +02:00
|
|
|
stdio: 'inherit'
|
2011-09-16 00:29:32 +02:00
|
|
|
});
|
|
|
|
|
2011-10-05 00:08:18 +02:00
|
|
|
cp.on('exit', function(code) {
|
2011-09-16 00:29:32 +02:00
|
|
|
childGone = true;
|
|
|
|
assert.equal(0, code);
|
|
|
|
});
|
|
|
|
|
|
|
|
process.on('exit', function() {
|
|
|
|
assert.ok(childGone);
|
|
|
|
});
|