killing process now shows process name in event logs #7197

Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
si458
2025-07-31 15:39:04 +01:00
parent f723486fc4
commit 1e534282ac
4 changed files with 31 additions and 29 deletions

View File

@@ -1302,8 +1302,10 @@ function handleServerCommand(data) {
case 'pskill': {
// Kill a process
if (data.value) {
MeshServerLogEx(19, [data.value], "Killing process " + data.value, data);
try { process.kill(data.value); } catch (ex) { sendConsoleText("pskill: " + JSON.stringify(ex)); }
var info = data.value.split('|'), pid = data.value, msg = " (Unknown)";
if (info.length > 1) { pid = info[0]; msg = " (" + info[1] + ")"; } else { info[1] = "Unknown"; }
MeshServerLogEx(19, info, "Killing process " + pid + msg, data);
try { process.kill(parseInt(pid)); } catch (ex) { sendConsoleText("pskill: " + JSON.stringify(ex)); }
}
break;
}

View File

@@ -45467,30 +45467,30 @@
]
},
{
"bs": "Proces ubijanja {0}",
"ca": "Procés de matança {0}",
"cs": "Proces zabíjení {0}",
"da": "Stopper proces {0}",
"de": "Beende Prozess {0}",
"en": "Killing process {0}",
"es": "Finalización del proceso {0}",
"fi": "Tappamisprosessi {0}",
"fr": "Processus de mise à mort {0}",
"hi": "हत्या की प्रक्रिया {0}",
"hu": "Folyamat leállítása {0}",
"it": "Processo di uccisione {0}",
"ja": "殺害プロセス{0}",
"ko": "프로세스 {0} 종료",
"nl": "Doodingsproces {0}",
"pl": "Zabijanie procesu {0}",
"pt": "Processo de morte {0}",
"pt-br": "Matando processo {0}",
"ru": "Завершение процесса {0}",
"sv": "Avlivningsprocessen {0}",
"tr": "Öldürme süreci {0}",
"uk": "Процес {0} Завершено",
"zh-chs": "杀死进程{0}",
"zh-cht": "殺死進程{0}",
"bs": "Proces ubijanja {0} ({1})",
"ca": "Procés de matança {0} ({1})",
"cs": "Proces zabíjení {0} ({1})",
"da": "Stopper proces {0} ({1})",
"de": "Beende Prozess {0} ({1})",
"en": "Killing process {0} ({1})",
"es": "Finalización del proceso {0} ({1})",
"fi": "Tappamisprosessi {0} ({1})",
"fr": "Processus de mise à mort {0} ({1})",
"hi": "हत्या की प्रक्रिया {0} ({1})",
"hu": "Folyamat leállítása {0} ({1})",
"it": "Processo di uccisione {0} ({1})",
"ja": "殺害プロセス{0} ({1})",
"ko": "프로세스 {0} ({1}) 종료",
"nl": "Doodingsproces {0} ({1})",
"pl": "Zabijanie procesu {0} ({1})",
"pt": "Processo de morte {0} ({1})",
"pt-br": "Matando processo {0} ({1})",
"ru": "Завершение процесса {0} ({1})",
"sv": "Avlivningsprocessen {0} ({1})",
"tr": "Öldürme süreci {0} ({1})",
"uk": "Процес {0} ({1}) Завершено",
"zh-chs": "杀死进程{0} ({1})",
"zh-cht": "殺死進程{0} ({1})",
"xloc": [
"default.handlebars->47->2560",
"default3.handlebars->35->2557"

View File

@@ -10645,7 +10645,7 @@
function dmousemove(e) { setSessionActivity(); e.addx = Q('DeskParent').scrollLeft; e.addy = Q('DeskParent').scrollTop; if (!xxdialogMode && desktop != null && Q('DeskControl').checked) { Q('Desk').style.cursor = ''; if ((webRtcDesktop != null) && (webRtcDesktop.softdesktop != null)) { webRtcDesktop.softdesktop.m.mousemove(e); desktop.m.sendKeepAlive(); } else { desktop.m.mousemove(e); } } else if (!xxdialogMode && desktop != null && !Q('DeskControl').checked) { Q('Desk').style.cursor = 'not-allowed'; } }
function dmousewheel(e) { setSessionActivity(); e.addx = Q('DeskParent').scrollLeft; e.addy = Q('DeskParent').scrollTop; if (!xxdialogMode && desktop != null && Q('DeskControl').checked) { if ((webRtcDesktop != null) && (webRtcDesktop.softdesktop != null)) { webRtcDesktop.softdesktop.m.mousewheel(e); desktop.m.sendKeepAlive(); } else { if (desktop.m.mousewheel) { desktop.m.mousewheel(e); } } haltEvent(e); return true; } return false; }
function drotate(x) { if (!xxdialogMode && desktop != null) { desktop.m.setRotation(desktop.m.rotation + x); deskAdjust(); deskAdjust(); } }
function stopProcess(id, name) { setDialogMode(2, "Process Control", 3, stopProcessEx, format("Stop process #{0} \"{1}\"?", id, name), id); return false; }
function stopProcess(id, name) { setDialogMode(2, "Process Control", 3, stopProcessEx, format("Stop process #{0} \"{1}\"?", id, name), (id + '|' + name)); return false; }
function stopProcessEx(buttons, tag) { meshserver.send({ action: 'msg', type: 'pskill', nodeid: currentNode._id, value: tag }); setTimeout(refreshDeskTools, 300); }
//

View File

@@ -11429,7 +11429,7 @@
function drotate(x) { if (!xxdialogMode && desktop != null) { desktop.m.setRotation(desktop.m.rotation + x); deskAdjust(); deskAdjust(); } }
function stopProcess(id, name) {
setModalContent('xxAddAgent', "Process Control", format("Stop process #{0} \"{1}\"?", id, name));
showModal('xxAddAgentModal', 'idx_dlgOkButton', () => stopProcessEx(3, id));
showModal('xxAddAgentModal', 'idx_dlgOkButton', () => stopProcessEx(3, (id + '|' + name)));
return false;
}
function stopProcessEx(buttons, tag) { meshserver.send({ action: 'msg', type: 'pskill', nodeid: currentNode._id, value: tag }); setTimeout(refreshDeskTools, 300); }
@@ -16426,7 +16426,7 @@
16: "Started file management session \"{0}\" from {1} to {2}",
17: "Processing console command: \"{0}\"",
18: "Displaying message box, title=\"{0}\", message=\"{1}\"",
19: "Killing process {0}",
19: "Killing process {0} ({1})",
20: "Opening: {0}",
21: "Getting clipboard content, {0} byte(s)",
22: "Setting clipboard content, {0} byte(s)",