• 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
14const err = '__This is some stderr__';
15
16// In AIX, the child exits even before the python parent
17// can setup the readloop. Provide a reasonable delay.
18setTimeout(function() {
19  process.stdout.write(out);
20  process.stderr.write(err);
21}, common.isAIX ? 200 : 0);
22