2016-05-20 23:05:54 +00:00
|
|
|
// https://github.com/nodejs/node/issues/6456#issuecomment-219320599
|
|
|
|
// https://gist.github.com/isaacs/1495b91ec66b21d30b10572d72ad2cdd
|
|
|
|
'use strict';
|
2017-03-06 15:24:07 +00:00
|
|
|
const common = require('../common');
|
2016-05-20 23:05:54 +00:00
|
|
|
|
|
|
|
// 1000 bytes wrapped at 50 columns
|
|
|
|
// \n turns into a double-byte character
|
|
|
|
// (48 + {2}) * 20 = 1000
|
2017-04-28 01:06:42 +00:00
|
|
|
let out = `${'o'.repeat(48)}\n`.repeat(20);
|
2016-05-20 23:05:54 +00:00
|
|
|
// Add the remaining 24 bytes and terminate with an 'O'.
|
|
|
|
// This results in 1025 bytes, just enough to overflow the 1kb OS X TTY buffer.
|
2017-04-28 01:06:42 +00:00
|
|
|
out += `${'o'.repeat(24)}O`;
|
2016-05-20 23:05:54 +00:00
|
|
|
|
|
|
|
const err = '__This is some stderr__';
|
|
|
|
|
2017-03-06 15:24:07 +00:00
|
|
|
// In AIX, the child exits even before the python parent
|
|
|
|
// can setup the readloop. Provide a reasonable delay.
|
|
|
|
setTimeout(function() {
|
|
|
|
process.stdout.write(out);
|
|
|
|
process.stderr.write(err);
|
2017-07-16 07:07:33 +00:00
|
|
|
}, common.isAIX ? 200 : 0);
|