Too many open files

Jeffrey M. Vinocur jeff at litech.org
Sun Aug 7 20:10:42 UTC 2005


On Aug 7, 2005, at 2:37 PM, Russ Allbery wrote:

> Are there a ton of abandoned sockets in pathrun?  If not, and if 
> nothing
> is showing in netstat, I have no idea.  There's nothing in the news 
> logs
> that indicates what might be happening?  innd does use sockets for 
> feeds
> to programs, so if a program is constantly respawning, that could 
> possibly
> cause something like this, but that would definitely be showing up in 
> the
> logs.

Oh.

Yeah, I guess I should read the logs more closely...

Russ, want to commit this to innd/rc.c, please?

     if (ident_fd < 0) {
         syslog(L_ERROR, "can't open socket for identd (%m)");
         return false;
     }
     if (bind(ident_fd,s_local,SA_LEN(s_local)) < 0) {
         syslog(L_ERROR, "can't bind socket for identd (%m)");
+       close(ident_fd);
         return false;
     }
     if (connect(ident_fd,s_distant,SA_LEN(s_distant)) < 0) {
         syslog(L_ERROR, "can't connect to identd (%m)");
+       close(ident_fd);
         return false;
     }



-- 
Jeffrey M. Vinocur
jeff at litech.org



More information about the inn-workers mailing list