/[muddleftpd]/muddleftpd/src/utils.c
ViewVC logotype

Diff of /muddleftpd/src/utils.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by ganneff, Thu Sep 26 07:55:42 2002 UTC revision 1.2 by rugger, Tue Apr 15 10:04:35 2003 UTC
# Line 274  void pathname_simplify(char *pathname) Line 274  void pathname_simplify(char *pathname)
274                                  break;                                            break;          
275                          default:                          default:
276                                  pathname[pos2] = pathname[pos];                                  pathname[pos2] = pathname[pos];
277                                  pos2++;                          pos2++;
278                  }                  }
279                  pos++;                  pos++;
280          }          }
# Line 1016  void errormsgfatal( char *errmessage, ch Line 1016  void errormsgfatal( char *errmessage, ch
1016          exit(1);          exit(1);
1017  }  }
1018    
1019    /*                      close file descriptors                          *
1020     ************************************************************************/
1021    
1022    // try to close all non-terminal file descriptors.
1023    
1024    void fd_closeall_nonterminal(void)
1025    {
1026            int count, maxfilefd = 1024;
1027    #ifdef RLIMIT_NPROC
1028            struct rlimit lim;
1029            
1030            getrlimit(RLIMIT_NOFILE, &lim);
1031            maxfilefd = lim.rlim_max;
1032    #endif
1033            for (count = 3; count < maxfilefd; count++)
1034                    close(count);
1035    }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26