index.js 282 B

12345678910111213
  1. const spawn = require('child_process').spawn;
  2. function run() {
  3. spawn(
  4. 'sh',
  5. ['-c', 'node -e "setInterval(() => console.log(`running`), 200)"'],
  6. {
  7. stdio: 'pipe',
  8. }
  9. );
  10. }
  11. var runCallCount = process.argv[2] || 1;
  12. for (var i = 0; i < runCallCount; i++) run();