Thanks. A few things. First, the truss output says
that 'tar' is using 'kopen' (whatever that is) rather than openat.
But the config.log you sent for an earlier build suggests that
tar is using openat. Can you please check this, by sending the
config.log for the last 'tar' you built most recently?
Attached the config.log from the second tarball you asked me to use
Second, can you please compile and send the truss output of the following
program so that we can see what the truss output for a true
'openat' looks like?
#define _LARGE_FILES 1
#include <fcntl.h>
int
main (void)
{
return openat (AT_FDCWD, ".", O_RDONLY) < 0;
}
tar-1.26-experimental$ mkdir otest
tar-1.26-experimental$ cd otest
otest$ vi otest.c
otest$ xlc -o otest otest.c
otest$ truss -o otest.truss -f ./otest
Truss output compressed and attached.
...
Here, file descriptor 4 is a message-catalog file descriptor, which is
sort of getting in the way, but it appears that 'tar' is simply giving up
when EMFILE occurs. Let's try to figure that out, by applying the following
patch to the latest 'tar' distribution I sent you, and seeing how the test
does with that. Please run this with LC_ALL=C in your environment.
Thanks.
Fresh extract of the second experimental tar archive ...
tar-1.26-experimental$ export LC_ALL=C LANG=C
tar-1.26-experimental$ locale
LANG=C
LC_COLLATE="C"
LC_CTYPE="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_MESSAGES="C"
LC_ALL=C
tar-1.26-experimental$ vi create.patch
tar-1.26-experimental$ gpatch -p1 -i create.patch
patching file src/create.c
tar-1.26-experimental$ ./configure && gmake
...
tar-1.26-experimental$ cp -pr /var/tmp/stest .
tar-1.26-experimental$ cd stest