yabridge icon indicating copy to clipboard operation
yabridge copied to clipboard

FreeBSD support

Open probonopd opened this issue 2 years ago • 3 comments

Feature description

It would be nice if yabridge could run on FreeBSD. Can it?

Anything else?

WINE is available on FreeBSD.

probonopd avatar Nov 01 '21 21:11 probonopd

In theory the only non-POSIX thing yabridge is doing is the use of procfs here and here, so those things would probably need to be changed. Other than that it should presumably work fine, but I've obviously never tested it.

robbert-vdh avatar Nov 01 '21 21:11 robbert-vdh

Happy to report that there is procfs on FreeBSD too:

https://www.freebsd.org/cgi/man.cgi?query=procfs&apropos=0&sektion=5&manpath=FreeBSD+12.2-RELEASE&arch=default&format=html

But there are differences, e.g.,;

FreeBSD% cat /proc/0/exe    
cat: /proc/0/exe: No such file or directory

probonopd avatar Nov 01 '21 21:11 probonopd

FreeBSD's procfs is different from Linux's so neither of the two things I linked would work there without any changes, but those two things are both fairly simple. The first thing is to check if a Unix domain socket is already opened by a program without having to shell out to lsof/ss, and the second usage is to check if a process is alive and not a zombie (since kill(pid, 0) also returns success when the process has ended without having been reaped by its parent yet). If Xorg, the rlimit functions, some realtime scheduling things, and the Freedesktop conventions all work the same on FreeBSD as they do on Linux (presumably they are, but I've never used FreeBSD myself) then everything else should work without any changes.

robbert-vdh avatar Nov 01 '21 21:11 robbert-vdh