Is there any way to pass an open file descriptor to another process that does not require an unix doman sockets or being a child process?

Edit: and not /proc due to not being portable.

Not quiet what I asked for but a way to bypass the limitations of sun_path may be sufficient for my case.

A mix of a symlink (for long dirname) and rename (for long basename) seems to work. To be portable (eg. not relying on unprivileged user namespaces) it requires a temp directory with a short name to be accessible.

proof of concept: https://paste.sr.ht/~sertonix/174ff4632315aeae300752c8b27e18ddc847e86e

fchdir might prevent the usage of symlink and it's race conditions. But is not thread safe