I wrote:
> Larry Rosenman wrote:
> > I had to hack on the code some more for FreeBSD:
> > (the realloc call needed the multiplication). I ran this same code
> > on UnixWare.
>
> I feel like a moron, having missed that. Probably explains the "bad
> file number" error I was getting on AIX, too...
And sure enough, that was it. Got the same results on AIX 5 as on other
systems:
kbrown@m048:~$ ./eatfds /usr/lib/librpm.so.0 /usr/lib/librpmbuild.so.0
dup() failed: Too many open files
Was able to use 1997 file descriptors
dup() failed: Too many open files
Was able to use 1997 file descriptors after opening 2 shared libs
kbrown@m048:~$ uname -a
AIX m048 1 5 0001063A4C00
--
Kevin Brown kevin@sysexperts.com