2016-05-21 01:05:54 +02:00
|
|
|
// https://github.com/nodejs/node/issues/6456#issuecomment-219320599
|
|
|
|
// https://gist.github.com/isaacs/1495b91ec66b21d30b10572d72ad2cdd
|
|
|
|
'use strict';
|
2017-03-06 16:24:07 +01:00
|
|
|
const common = require('../common');
|
2016-05-21 01:05:54 +02:00
|
|
|
|
|
|
|
// 1000 bytes wrapped at 50 columns
|
|
|
|
// \n turns into a double-byte character
|
|
|
|
// (48 + {2}) * 20 = 1000
|
2017-04-28 03:06:42 +02:00
|
|
|
let out = `${'o'.repeat(48)}\n`.repeat(20);
|
2016-05-21 01:05:54 +02: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 03:06:42 +02:00
|
|
|
out += `${'o'.repeat(24)}O`;
|
2016-05-21 01:05:54 +02:00
|
|
|
|
2017-03-06 16:24:07 +01: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.exit(0);
|
2017-07-16 09:07:33 +02:00
|
|
|
}, common.isAIX ? 200 : 0);
|