monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

closing file descriptors


From: rory
Subject: closing file descriptors
Date: Fri, 27 Sep 2002 21:32:44 -0700 (PDT)

This piece of code bothers me in env.c:


  /*
   * Require that the other file descriptios are closed. Should we use
   * sysconf() or getdtablesize() or getrlimit() or...
   */
  for(i = 3; i < 1024; i++)
      (void) close(i);
  errno= 0;


I don't understand why this is done.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]