title: Too many open files in system while not actually opening any files
body: <p>I am developing a backup utility and I am getting the error:</p>
  
  <blockquote>
    <p>Too many open files in system</p>
  </blockquote>
  
  <p>after it runs for a while. The error is returned by <code>stat()</code>.</p>
  
  <p>Since I am not actually opening any files (<code>fopen()</code>), my question is if any of the following functions (which I am using) take up a file descriptor, and if so, what can I do to release it?</p>
  
  <ul>
  <li><code>getwd()</code></li>
  <li><code>chdir()</code></li>
  <li><code>mkdir()</code></li>
  <li><code>stat()</code></li>
  <li><code>time()</code></li>
  </ul>