Added kill check for Parallels Acrobat Reader

This commit is contained in:
Scott Idem
2022-05-07 17:58:27 -04:00
parent 60df29243c
commit 2533410c78

View File

@@ -482,8 +482,19 @@ exports.kill_processes = async function ({process_name = null}) {
});
console.log(`Killed processes matching ${process_name}`);
if (os.platform == 'darwin') {
if (process_name == 'Parallels:Acrobat Reader') {
// Regular expression: (Parallels).*(Acrobat Reader)
// This will find any process with Parallels and Acrobat Reader in the name
cmd = `pkill -i -f '(Parallels).*(Acrobat Reader)'`;
child_process.exec(cmd, (err, stdout, stdin) => {
if (err) throw err;
console.log(stdout);
});
console.log('Killed Parallels Acrobat Reader process');
}
if (process_name == 'Parallels:PowerPoint') {
// Regular expression: (Parallels).*(PowerPoint)
// This will find any process with Parallels and PowerPoint in the name