This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KDE API for process managment?

Tags: None
(comma "," separated)
User avatar
JanGerrit
Moderator
Posts
647
Karma
3
OS

KDE API for process managment?

Mon Jul 27, 2009 4:16 pm
Is there an easy API for the managment of the processes? Like listing all processes and kill some of them?
Thanks for your answers.


Image
User avatar
anda_skoa
KDE Developer
Posts
783
Karma
4
OS

Re: KDE API for process managment?

Mon Jul 27, 2009 10:20 pm
Probably by talking to ksysguardd, i.e. check how KSysGuard does it.

Could make sense to create and experimental API for that so it can later on be moved to kdelibs.

Cheers,
_


anda_skoa, proud to be a member of KDE forums since 2008-Oct.
User avatar
JanGerrit
Moderator
Posts
647
Karma
3
OS
Thanks, anda_skoa, and sorry for answering so late...
I looked at the source code of KSysGuard and after some time I got it (after browsing through 4 or 5 classes :():
Code: Select all
KSysGuard::Processes *processes = KSysGuard::Processes::getInstance();
QList<KSysGuard::Process *> processlist = processes->getAllProcesses();
foreach(KSysGuard::Process * process, processlist) {
    QString name = process->name;
}


Thanks again :)


Image


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]