On 12/21/2011 09:06 AM, Jim Meyering wrote: >> >> Where to go now? >> >> Resorting to wild guesses, I tried all 3 members of struct DIR as >> DIF_FD_MEMBER_NAME, no change to the EBADF > > Write a small test program that opens say four directories, > to get one DIR* pointer for each. Then print a table of > the DIR member values. Maybe you'll see a pattern, i.e., > how to derive an FD number from those dd1,2,3 fields.
If the NonStop opendir() does not open a directory fd under the hood, then maybe we should wrap opendir() so that the gnulib rpl_opendir() always opens a directory at the same time; at which point the gnulib rpl_dirfd merely returns that directory fd. Also, does NonStop have anything like Linux' /proc/self/fd or lsof, for reverse engineering which fds a process has open and on what files? Is there an equivalent to strace functionality for tracking all syscalls made by libc? -- Eric Blake ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature