Well, one reason to post this thread was to find out whether someone would have a usecase (and whether it would be useful if I added stuff like TLS and authentication). So far, I only know my own (slightly obscure) usecase:
The standard way for an MTA to use dovecot's authentication is through a local unix socket. This is supported by exim. dovecot has the option to offer a TCP socket for auth as well, but unfortunately, exim can't use it. I have a setup with an internal mailer and an external "mail gateway", both have dovecot and exim installed. For auth, the external MTA needs to use the internal dovecot's socket, cause dovecot in proxy mode uses some kind of tunneled auth and the external dovecot socket will succeed with any credentials (I only noticed that after some spammer started abusing my external MTA)

I had to disable authenticated relaying quickly, and to re-enable it, I wrote this tool…
I think
kpedersen (?) outlined another possible usecase in a different thread: forwarding X11's local socket to a jail on the same machine that's on a different FS. Not sure whether this has been tested so far
Jose: lol – there are for sure obscure optimizations, not all conforming to the C standard. But from
-O3
, you should expect that it respects the standard. So, if the result is broken, either your code or the compiler is broken

– and in this case, I couldn't blame the compiler, without
volatile
, it's indeed incorrect. Guess last year, I was mislead to believe
volatile
was already implied by
sig_atomic_t
.