like it was said, you could do it for windows relatively easy using win api: Enumerating All Processes && Terminating a Process
for linux you could try running smth like "ps -A" using QProcess and parse its standard output; smth like this:
QProcess process;
process.setProcessChannelMode(QProcess::MergedChannels);
process.start("ps", QStringList() << "-A");
if (!process.waitForStarted())
return;
if (!process.waitForFinished())
return;
//qDebug() << process.readAll();
QByteArray output = process.readLine().trimmed();
while (!output.isEmpty())
{
qDebug() << output;
QList<QByteArray> items = output.split(' ');
qDebug() << "pid:" << items.first() << " cmd:" << items.last();
qDebug() << "===============================================";
output = process.readLine().trimmed();
}
this should return a list of running processes, you could try different command line options for ps to get the data you need. I believe killing the process could be done the same ways; by running kill [pid]
hope this would give you an idea on how to proceed, regards