2020-02-19 00:05:13 +09:00
|
|
|
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)
|
2018-04-28 17:26:38 +09:00
|
|
|
}
|
2020-02-19 00:05:13 +09:00
|
|
|
})
|