diff --git a/src/lib/3rdparty/processinfo.cpp b/src/lib/3rdparty/processinfo.cpp index 79e5cbb63..4002c1099 100644 --- a/src/lib/3rdparty/processinfo.cpp +++ b/src/lib/3rdparty/processinfo.cpp @@ -84,7 +84,10 @@ pid_t ProcessInfo::GetPIDbyName(const char* cchrptr_ProcessName) const FILE* fd_CmdLineFile = fopen(chrarry_CommandLinePath, "rt") ; // open the file for reading text if (fd_CmdLineFile) { int r = fscanf(fd_CmdLineFile, "%20s", chrarry_NameOfProcess) ; // read from /proc//cmdline - Q_UNUSED(r) + + if (r < 1) { + continue; + } fclose(fd_CmdLineFile); // close the file prior to exiting the routine