2023-05-07 17:56:55 +03:00
|
|
|
/**
|
|
|
|
* Hack for wiping out the threads signal handlers
|
|
|
|
* See: https://github.com/andywer/threads.js/issues/388
|
|
|
|
* Make sure:
|
|
|
|
* - This is imported before any real imports from "threads"
|
|
|
|
* - This is imported as early as possible to avoid removing our own signal handlers
|
|
|
|
*/
|
|
|
|
import "threads";
|
2023-06-26 19:55:16 +00:00
|
|
|
import { env } from "./env";
|
|
|
|
if (!env.DEBUG) {
|
|
|
|
process.removeAllListeners("SIGINT");
|
|
|
|
process.removeAllListeners("SIGTERM");
|
|
|
|
}
|