kill all subprocesses on closing #6
1 changed files with 4 additions and 2 deletions
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue