title: wget() to /tmp/wget produces "EMFILE, too many open files"
body: <p>I am monitoring a list of IP using wget() from nodejs, using "node-wget".</p>
  
  <p>The exact command is</p>
  
  <pre><code>    wget( {
          url:  szTargetIP,     // as "http://10.139.238.167
          dest: '/tmp/wget/',
          timeout: 2000    
      },
  </code></pre>
  
  <p>Right after scanning the file (as /tmp/wget/10.139.238.167), I do</p>
  
  <pre><code>fs.unlink( szIPfn, (err) =&gt; {          // delete file
      if (err) {
          if ( err.code === 'ENOENT' ) {
              mConsole( '--- file '+ szIPfn +' does not exist' ) ;
          } else {
              throw err ; // fatal error : stop
          } ;
      } else {
          mConsole( '+++ successfully deleted ' + szIPfn ) ;
      } ;
  } ) ; // unlink
  </code></pre>
  
  <p>I always log " +++ successfully deleted /tmp/wget/10.139.238.167"</p>
  
  <p>Unfortunatelly, after some time of running my app.js, 
  I get "EMFILE, too many open files"</p>
  
  <p>The directory "/tmp/wget" is empty, but ... "lsof | grep wget" displays</p>
  
  <pre><code>/tmp/wget/10.139.238.167 (deleted)
  </code></pre>
  
  <p>Any ideas ?</p>
  
  <p><strong>* complete code *</strong></p>
  
  <pre><code>wget( {
          url:  szTargetIP,  
          dest: '/tmp/wget/',
          timeout: 2000       
      },
      function (error, response, body) {
          szNow = genTimeStamp() ; // get timestamp
          if (error) {
              console.log('--- wget() error:');
          } else {
              console.log('+++ wget() ok');
          } ; // no error = wget() ok
      }
  ) ; // wget()
  
  var szIPfn = '/tmp/wget/' + iWget_IP ; 
  fs.unlink( szIPfn, (err) =&gt; {
  </code></pre>