mirror of
https://github.com/lifegpc/eh-downloader.git
synced 2026-06-06 05:38:44 +08:00
Add SIGKILL handle
This commit is contained in:
@@ -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();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user