import { spawn } from 'child_process' console.log('primary', process.pid) let secondary = spawn('node', ['./test/kill/second_runner.mjs']) secondary.stdout.on('data', function(data) { process.stdout.write(data) }) setInterval(function() { console.log('primary', process.pid) }, 100)