summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/processinfo.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/noncore/settings/sysinfo/processinfo.cpp b/noncore/settings/sysinfo/processinfo.cpp
index f95d9cc..8e992d5 100644
--- a/noncore/settings/sysinfo/processinfo.cpp
+++ b/noncore/settings/sysinfo/processinfo.cpp
@@ -23,6 +23,10 @@
23#include <qtimer.h> 23#include <qtimer.h>
24#include <qfile.h> 24#include <qfile.h>
25#include <qdir.h> 25#include <qdir.h>
26#include <qmessagebox.h>
27
28#include <sys/types.h>
29#include <signal.h>
26 30
27#include "processinfo.h" 31#include "processinfo.h"
28 32
@@ -115,5 +119,21 @@ void ProcessInfo::updateData()
115 119
116void ProcessInfo::viewProcess(QListViewItem *process) 120void ProcessInfo::viewProcess(QListViewItem *process)
117{ 121{
122 QString pid= process->text(0);
123 QString command = process->text(1);
124 switch( QMessageBox::information( this, (tr("Kill Process?")),
125 (tr("You really want to kill\n"+command+" PID: "+pid+"?")),
126 (tr("Yes")), (tr("No")), 0 )){
127 case 0: // Yes clicked,
128 {
129 bool ok;
130 pid_t child=pid.toInt(&ok,10);
131 if((kill(child,SIGTERM)) < 0)
132 perror("kill:SIGTERM");
133 }
134 break;
135 case 1: // Cancel
136 break;
137 };
118//printf("Double click for PID: %s\n", process->text(0).stripWhiteSpace().latin1()); 138//printf("Double click for PID: %s\n", process->text(0).stripWhiteSpace().latin1());
119} 139}