Don't bother trying to kill the child process on exit.

As the exit signal handler does not allow asynchronous tasks and
besides, killing the parent should kill its children too.
This commit is contained in:
D. Berge
2023-10-14 20:02:54 +02:00
parent 39a21766b6
commit cdd96a4bc7

View File

@@ -23,10 +23,14 @@ async function main () {
INFO("Versions:", versions);
process.on('exit', () => eventManager.kill());
const eventManagerPath = [__dirname, "events"].join("/");
const eventManager = fork(eventManagerPath, /*{ stdio: 'ignore' }*/);
process.on('exit', async () => {
DEBUG("Exiting");
// eventManager.kill()
// periodicTasks.cleanup();
});
} catch (err) {
ERROR(err);
process.exit(2);