title: Is there a need to close file descriptors before exit?
body: <p>Of course, the immediate answer for most situations is <strong>"yes"</strong>, and I am a firm believer that a process should correctly cleanup any resources it has allocated, but what I have in my situation is a long-running system daemon that opens a fixed number of file descriptors at the startup, and closes them all before exiting.</p>
  
  <p>This is an embedded platform, and I'm trying to make the code as compact as possible, while not introducing any bad style. But since file descriptors are closed before exit anyway, does this file descriptor cleanup code serve any purpose?  Do you always close all your file descriptors?</p>