• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// https://github.com/nodejs/node/issues/6456#issuecomment-219320599
2// https://gist.github.com/isaacs/1495b91ec66b21d30b10572d72ad2cdd
3'use strict';
4const common = require('../common');
5
6// 1000 bytes wrapped at 50 columns
7// \n turns into a double-byte character
8// (48 + {2}) * 20 = 1000
9let out = `${'o'.repeat(48)}\n`.repeat(20);
10// Add the remaining 24 bytes and terminate with an 'O'.
11// This results in 1025 bytes, just enough to overflow the 1kb OS X TTY buffer.
12out += `${'o'.repeat(24)}O`;
13
14// In AIX, the child exits even before the python parent
15// can setup the readloop. Provide a reasonable delay.
16setTimeout(function() {
17  process.stdout.write(out);
18  process.exit(0);
19}, common.isAIX ? 200 : 0);
20