src/daemon/common.[ch]: Implement the "read_file()" function.