Issue with Server running on LINUX - Red Hat 4.0.
I get intermittent results when queried for getrlimit with
RLIMIT_NOFILE.
FD_SETSIZE is set to 1024 on this 64 bit system.
My application which is a 32 bit app is quering for RLIMIT_NOFILE and I
should be seeing output like, 8*1024 for both rlim_cur and rlim_max.
But I get the following,

getrlimit(RLIMIT_NOFILE, {rlim_cur=34359738376*1024,
rlim_max=-47996408134880}) = 0

select ran through each of the open fds and the getrlimit values
changed, but as I see intermittently as below,

....
select(8192, [1066], NULL, NULL, {0, 4093103833998}) = 0 (Timeout)
select(8192, [1067], NULL, NULL, {0, 4097398801294}) = 0 (Timeout)
getrlimit(RLIMIT_NOFILE, {rlim_cur=34359738376*1024,
rlim_max=-55967867436256}) = 0


Any idea why this would be so?
I do suspect FD_SETSIZE being set to 1024 to be too small and hence
corruption when quering for file descriptors. Please share your
insights.