diff --git a/src/api/idle.js b/src/api/idle.js index c794e87..9c972e1 100644 --- a/src/api/idle.js +++ b/src/api/idle.js @@ -1,6 +1,6 @@ import { exec } from 'child_process'; -const killProcesses = async pids => process.platform !== 'win32' ? Promise.resolve('') : new Promise(resolve => exec(`taskkill /F ${pids.map(x => `/PID ${x}`).join(' ')}`, (e, out) => resolve(out))); +const killProcesses = async pids => new Promise(resolve => exec(process.platform !== 'win32' ? `kill -9 ${pids.join(' ')}` : `taskkill /F ${pids.map(x => `/PID ${x}`).join(' ')}`, (e, out) => resolve(out))); export default async (CDP, { browserEngine, closeHandlers }) => { if (browserEngine !== 'chromium') { // current implementation is for chromium-based only @@ -44,7 +44,7 @@ export default async (CDP, { browserEngine, closeHandlers }) => { let wakeUrl, hibernating = false; const hibernate = async () => { // hibernate - crashing chromium internally to save max memory. users will see a crash/gone wrong page but we hopefully "reload" quick enough once visible again for not much notice. if (hibernating) return; - if (process.platform !== 'win32') return sleep(); // sleep instead - full hibernation is windows only for now due to needing to do native things + // if (process.platform !== 'win32') return sleep(); // sleep instead - full hibernation is windows only for now due to needing to do native things hibernating = true;