diff --git a/src/common/processing_linux.c b/src/common/processing_linux.c index f5fb46e1b..e4a8f62d5 100644 --- a/src/common/processing_linux.c +++ b/src/common/processing_linux.c @@ -30,6 +30,7 @@ #include #elif defined(__HAIKU__) #include + #include #endif enum { FF_PIPE_BUFSIZ = 8192 }; @@ -312,6 +313,21 @@ void ffProcessGetInfoLinux(pid_t pid, FFstrbuf* processName, FFstrbuf* exe, cons } kvm_close(kd); + #elif defined(__HAIKU__) + + if (exePath) + { + image_info info; + int32 cookie = 0; + + while (get_next_image_info(pid, &cookie, &info) == B_OK) + { + if (info.type != B_APP_IMAGE) continue; + ffStrbufSetS(exePath, info.name); + break; + } + } + #endif if(exe->length == 0) @@ -488,6 +504,8 @@ const char* ffProcessGetBasicInfoLinux(pid_t pid, FFstrbuf* name, pid_t* ppid, i *ppid = info.parent; } + FF_UNUSED(tty); + #else return "Unsupported platform";