2023-10-31 14:03:34 +00:00
|
|
|
import { spawn } from 'child_process'
|
|
|
|
|
2023-10-31 14:07:48 +00:00
|
|
|
console.log('primary', process.pid)
|
|
|
|
|
2023-10-31 14:03:34 +00:00
|
|
|
let secondary = spawn('node', ['./test/kill/second_runner.mjs'])
|
|
|
|
|
|
|
|
secondary.stdout.on('data', function(data) {
|
|
|
|
process.stdout.write(data)
|
|
|
|
})
|
|
|
|
|
2023-10-31 14:07:48 +00:00
|
|
|
setInterval(function() { console.log('primary', process.pid) }, 100)
|