Re: Working around platform limitations on GetConnectionUnixProcessID?

RenĂ© J.V. Bertin <[email protected]> Sun, 20 Apr 2025 00:37:50 +0200
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <2392300.Gspo5oVGhN@bola>
On Sunday April 20 2025 10:11:48 Lawrence D'Oliveiro wrote:

>Surely, that is built on top of getsockopt(... SO_PEERCRED ...), which
>should be supported on the BSDs. From which macOS/Darwin is derived.

It still fails with a permissions error in DBus 1.14 installed via MacPorts; judging from the dates in

>Seems there was also an issue with lack of socketpair(2) support, but
>that has now been fixed
><https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=176419>.

that version should have the fix, AFAICT?

Darwin is some the userland from some BSD flavour on top of a Mach kernel. That's where the issue could be.

Adding a method to return the own PID was a piece of cake in a Qt-based application. Reading the value from the returned `(a{sv})` container in a GLib-based application was a lot more trial-and-error work...