Terminal (Haiku): add basic support

This commit is contained in:
李通洲 2025-02-12 00:44:41 +08:00
parent ef60910e51
commit d3a5f986a8
No known key found for this signature in database
GPG Key ID: 79D0E1C4B64C86A0

View File

@ -28,6 +28,8 @@
#elif defined(__NetBSD__)
#include <sys/types.h>
#include <sys/sysctl.h>
#elif defined(__HAIKU__)
#include <OS.h>
#endif
enum { FF_PIPE_BUFSIZ = 8192 };
@ -476,6 +478,16 @@ const char* ffProcessGetBasicInfoLinux(pid_t pid, FFstrbuf* name, pid_t* ppid, i
if (!proc)
return "kvm_getprocs() failed";
#elif defined(__HAIKU__)
team_info info;
if (get_team_info(pid, &info) == B_OK)
{
ffStrbufSetS(name, info.name);
if (ppid)
*ppid = info.parent;
}
#else
return "Unsupported platform";