Coding in #C ... sometimes I really enjoy just using what I created a long time ago 😁.
This is the whole change to #Xmoji allowing it to fork into background on startup:
https://github.com/Zirias/xmoji/commit/0ab2d8ed424ebc35aa99e5c2bd15b097a5e74b42
It's the first step to implementing an (optional) single-instance mode, that will only allow one running instance per user and machine. Implementing that will require a local #Unix domain #socket, which is also covered by the same library, #poser 😉.
I designed this library for (simple and small) #networking #daemons, but found it's quite useful for #X11 applications as well. If you want to know more, here are the docs:
https://zirias.github.io/poser/