How to make ulimit (UL_GDESLIM, 0) and choose a job?

We are porting our C application from Solaris 8 to Solaris 10. I am getting an error when I run this code on Solaris 10. I am using the 32-bit gcc compiler.

nFDs = ulimit(UL_GDESLIM, 0);
n=select(nFDs, &set, NULL, NULL, NULL);

Mistake:

Error : GetKey_(): select(): Invalid argument

I understood why I got this error because it is nFDsmore than 1024. The following isselect.h

#ifdef  _LP64 
#define  FD_SETSIZE      65536 
#else 
#define  FD_SETSIZE      1024

Could you give me a pointer to how they work ulimit(UL_GDESLIM, 0)and select, and which heading do I need to fix?

+4
source share
1 answer

Oracle, , " " , Solaris. , /etc/system :

set rlim_fd_max = 65536

65536. , "running" ulimit , C ulimit(...) select(...).

: http://docs.oracle.com/cd/E19644-01/817-5051/pt_tuningos.html#wp57451

+1

All Articles