Mehrere PID Prüfen
Solved
German
-
@val78
pidof
Linux call: https://linux.die.net/man/8/pidof
https://stackoverflow.com/a/36875505
https://stackoverflow.com/a/37721865
https://stackoverflow.com/a/43796871etc.
You would run the
pidof
via Qt'sQProcess
, and read back its output viaQProcess::...read...
, e.g. https://stackoverflow.com/a/17344946.Ultimately solutions read & parse what's going on below the
/proc
pseudo-file system, if you want to do that yourself --- Qt will not have its own function for that. -
ich habe jetz so
QProcess process; QString pgm("pgrep"); QStringList args = QStringList() << "firefox"; process.start(pgm, args); process.waitForReadyRead(); if(!process.readAllStandardOutput().isEmpty()) qDebug()<<"TRUE"; else qDebug()<<"False";
wie krieg ich jetz noch "oder" um mehrere PIDs gleichzeitig prüfen'?