Add SIGKILL handle

This commit is contained in:
2023-05-22 13:05:36 +08:00
parent ad95be5524
commit 144797f246

View File

@@ -20,4 +20,11 @@ export function add_exit_handler(m: TaskManager) {
m.close();
};
Deno.addSignalListener("SIGINT", handler);
if (Deno.build.os !== "windows") {
Deno.addSignalListener("SIGKILL", () => {
m.abort();
m.force_abort();
m.close();
});
}
}