处理 SIGHUP 信号

This commit is contained in:
🌌 2024-02-15 23:50:36 +08:00
parent 7e710a1bf0
commit 259797ed15
1 changed files with 2 additions and 0 deletions

View File

@ -43,6 +43,8 @@ async function UpdateTitle() {
/** 设置时区 */
process.env.TZ = "Asia/Shanghai"
process.on("SIGHUP", () => process.exit())
/** 捕获未处理的错误 */
process.on("uncaughtException", error => {
if (typeof logger == "undefined") console.log(error)