Skip to content

Commit 2664f8b

Browse files
authored
fix: kill game parent process (#1419)
1 parent 3a3b4f5 commit 2664f8b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/app/desktop/components/Instances/Instance.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ const Instance = ({ instanceName }) => {
210210
dispatch(openModal('InstanceDuplicateName', { instanceName }));
211211
};
212212
const killProcess = () => {
213-
console.log(isPlaying.pid);
214213
psTree(isPlaying.pid, (err, children) => {
214+
process.kill(isPlaying.pid);
215215
if (children?.length) {
216216
children.forEach(el => {
217217
if (el) {
@@ -220,6 +220,11 @@ const Instance = ({ instanceName }) => {
220220
} catch {
221221
// No-op
222222
}
223+
try {
224+
process.kill(el.PPID);
225+
} catch {
226+
// No-op
227+
}
223228
}
224229
});
225230
} else {

0 commit comments

Comments
 (0)