TerminalShell: move process info query logic into common place

This commit is contained in:
李通洲
2024-05-28 22:34:41 +08:00
committed by 李通洲
parent 1f3d18cdbc
commit 3811bb1be4
5 changed files with 259 additions and 248 deletions
+7
View File
@@ -19,3 +19,10 @@ static inline const char* ffProcessAppendStdErr(FFstrbuf* buffer, char* const ar
ffStrbufTrimRightSpace(buffer);
return error;
}
#ifdef _WIN32
bool ffProcessGetInfoWindows(uint32_t pid, uint32_t* ppid, FFstrbuf* pname, FFstrbuf* exe, const char** exeName, FFstrbuf* exePath, bool* gui);
#else
void ffProcessGetInfoLinux(pid_t pid, FFstrbuf* processName, FFstrbuf* exe, const char** exeName, FFstrbuf* exePath);
const char* ffProcessGetBasicInfoLinux(pid_t pid, char* name, pid_t* ppid, int32_t* tty);
#endif