I have a child process.
The Questions is:
Example
import { spawn } from 'child_process'
const backTaskProcess = spawn(process.execPath, ['back-task.js'], {
cwd: process.cwd(),
})
// Do i need to disabled it manually?
process.on('SIGQUIT', () => {
backTaskProcess.kill('SIGQUIT')
})
No, no, and yes. You don't need to kill it manually, unless you use detached: true in the options. There are exceptions when using fork(), but that doesn't apply to your code.