in reply to Clues on writing a secure daemon

Tackling your three suggestions in order ...