Right now when we want to stop mining server we are sending SIGKILL to the process.
|
const { stdout, stderr } = child_process.exec(`kill -9 ${PID}`, { shell: true }); |
I think that instead of killing process "just like that" we should send SIGTERM signal and let process ends gracefully.