Again for windows I can enumerate processes using toolhelp library
PROCESSENTRY32 pe32 = {0};
HANDLE hsp = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );
pe32.dwSize = sizeof( PROCESSENTRY32 );
Process32First( hsp, &pe32 );
do
{
// access PROCESSENTRY32 values
/*
DWORD dwSize;
DWORD cntUsage;
DWORD th32ProcessID; // this process
ULONG_PTR th32DefaultHeapID;
DWORD th32ModuleID; // associated exe
DWORD cntThreads;
DWORD th32ParentProcessID; // this process's parent process
LONG pcPriClassBase; // Base priority of process's threads
DWORD dwFlags;
CHAR szExeFile[MAX_PATH]; // Path
*/
} while( Process32Next( hsp, &pe32 ) );
Is there any way to do it in linux/unix,. Ineed process ID, parent process Id and process name. I tryes to scan /proc/ folder but I cannot figure out the subfolders and files.
Thank you
The red icon (on the top-left) is a hand or a question mark ? I thought is a Q mark