Skip to content

Commit d3a5f98

Browse files
committed
Terminal (Haiku): add basic support
1 parent ef60910 commit d3a5f98

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/common/processing_linux.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
#elif defined(__NetBSD__)
2929
#include <sys/types.h>
3030
#include <sys/sysctl.h>
31+
#elif defined(__HAIKU__)
32+
#include <OS.h>
3133
#endif
3234

3335
enum { FF_PIPE_BUFSIZ = 8192 };
@@ -476,6 +478,16 @@ const char* ffProcessGetBasicInfoLinux(pid_t pid, FFstrbuf* name, pid_t* ppid, i
476478
if (!proc)
477479
return "kvm_getprocs() failed";
478480

481+
#elif defined(__HAIKU__)
482+
483+
team_info info;
484+
if (get_team_info(pid, &info) == B_OK)
485+
{
486+
ffStrbufSetS(name, info.name);
487+
if (ppid)
488+
*ppid = info.parent;
489+
}
490+
479491
#else
480492

481493
return "Unsupported platform";

0 commit comments

Comments
 (0)