Of course they all have to be different. Solaris /proc/self/file/a.out Linux /proc/self/exe FreeBSD /proc/curproc/file [optional] Darwin no /proc Code will be much like Linux and Solaris
commit 80e805753b9098d419c6a09c1481a89c89ab32ce Author: Paul Floyd <pjfloyd@wanadoo.fr> Date: Sat Feb 14 18:52:12 2026 +0100 Bug 515992 - Add FreeBSD /proc virtualisation for cmdline and file and a few other cleanup pushes