|
From: Andrew M. <fit...@us...> - 2008-06-24 20:49:32
|
Update of /cvsroot/radmind/radmind-assistant/rte In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29281 Modified Files: rteauthexec.c Log Message: Increase max open files before executing tools. Handles large K files. Index: rteauthexec.c =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rte/rteauthexec.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** rteauthexec.c 26 Apr 2006 14:01:10 -0000 1.11 --- rteauthexec.c 24 Jun 2008 20:49:29 -0000 1.12 *************** *** 72,77 **** rte_exec( int ac, char *av[] ) { ! int status; ! pid_t pid; switch ( fork()) { --- 72,87 ---- rte_exec( int ac, char *av[] ) { ! int status; ! pid_t pid; ! struct rlimit rl; ! ! /* increase maximum number of open fds for long command files */ ! rl.rlim_max = rl.rlim_cur = 1024; ! ! if ( setrlimit( RLIMIT_NOFILE, &rl ) < 0 ) { ! fprintf( stderr, "Using setrlimit to increase number of open files " ! "returned an error: %s\n", strerror( errno )); ! exit( 2 ); ! } switch ( fork()) { |