correctly close the process

This commit is contained in:
Mylloon 2024-05-17 21:22:56 +02:00
parent dd62f81e35
commit 20bf0c1d67
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -12,6 +12,8 @@ import {
import path = require("path"); import path = require("path");
import ffmpegPath = require("ffmpeg-static"); import ffmpegPath = require("ffmpeg-static");
const kill = require("terminate");
let error = false; let error = false;
const moviesFilter = { const moviesFilter = {
@ -229,8 +231,8 @@ app.whenReady().then(() => {
}); });
app.on("window-all-closed", () => { app.on("window-all-closed", () => {
processes.forEach((proc) => { processes.forEach((process) => {
proc.kill(); kill(process.pid);
}); });
app.quit(); app.quit();