Add codesnippets in c-support of daemon initial function