QProcess, detect if process is already running?
-
@jsulm , what would it take to prompt Qt to explorer this and implement a solution? It strikes me this is a gapping hole in the whole multi-platform solution as you say Qt doesn't currently support it, which means unfortunately that having in order to implement a multi-platform solution I need to resort to different solutions for each platform.
-
@SPlatten said in QProcess, detect if process is already running?:
what would it take to prompt Qt to explorer this and implement a solution?
This is something you need to ask actual Qt developers as this is user forum. You can even file change request in Qt bug tracker. Checking whether there is a process executing a specific executable is a rare use case, so I doubt it has a high priority.
-
FYI, in the source code of Qt installer framework, there's a KD Tools Library with a
runningProcesses()
function which may be helpful.
https://code.qt.io/cgit/installer-framework/installer-framework.git/tree/src/libs/kdtools/sysinfo.h#n78
It has implementations for different platforms in:
https://code.qt.io/cgit/installer-framework/installer-framework.git/tree/src/libs/kdtools/sysinfo_mac.cpp#n78
https://code.qt.io/cgit/installer-framework/installer-framework.git/tree/src/libs/kdtools/sysinfo_x11.cpp#n122
https://code.qt.io/cgit/installer-framework/installer-framework.git/tree/src/libs/kdtools/kdsysinfo_win.cpp#n59