14 lines
306 B
JavaScript
14 lines
306 B
JavaScript
const { platform } = require('os')
|
|
const { fork } = require('child_process')
|
|
|
|
fork('./index.js', {
|
|
stdio: 'inherit',
|
|
}).on('exit', (code) => {
|
|
if (code !== 0) {
|
|
if (code === 3221225477 && platform() === 'win32') {
|
|
console.error(code)
|
|
process.exit(0)
|
|
}
|
|
process.exit(code)
|
|
}
|
|
})
|