create a daemon
I maintain some daemons in Perl (pfinger) and in Python (pygopher) with some constraints:
- daemonisation (double fork, file descriptors closing)
- privileges separation
- differents users for the process, the data and the proxy if needed
- resources management (with systemd for GNU/Linux or login.conf in OpenBSD)
Client requests are handled by frameworks that are doing a great job.