@MarkMLl
>Extending this to handle multiple connections to the same socket is "left as an exercise", I have not explored using
> inetd etc.
Thanks but it seems even more difficult to me, if it is not multithread in the way I need.
@Remy
>>That hasn't been allowed since Windows Vista, which introduced "Session 0 Isolation" to secure services away from users.
>> While it is technically possible to make a background service display a GUI, it's much more work to accomplish, and not >>really worth the effort nowadays.
Ok, that was a long time ago.
>If it is not possible anymore, I would gladly create a separated graphic frontend app.
>>That is exactly what you should do.
Sure, but I don't know where to look to "port" my application to a daemon. The gui elements were added but are not needed, still I can't separate the multithread code from the elements that prevent me to succesfully compile it as a pure service /daemon. If I won't be able to create a daemon, I will go on and code in the app that will provide the gui and the multithread. Not exacly the cleanest solution, but it is the only solution at the moment.
To recap:
This one contains the implementation of the multithreaded server into a normal gui app:
https://www.marullo.it/wp-content/uploads/2026/02/Multithreadgui.zipI am unable at the moment to convert it in a daemon/service app.
It does compile in windows and linux Ubuntu into a vm. It does compile on a PI5 but it is not stable, GTK complains and debugger fails.
This a working daemon tested in windows:
https://www.marullo.it/wp-content/uploads/2026/02/ServiceDaemonExample.zipAnd this is my failed attempt to port the relevant part of code from the multithreadgui.zip into the ServiceDaemonExample.zip
https://www.marullo.it/wp-content/uploads/2026/02/MultithreadDaemon.zipAny help/pointer to relevant documentation to let me out from this wormhole is really appreciated, thanks.
Giuseppe Marullo