On Tue, 27 Jul 2004, Wayne Davison wayned-at-samba.org |Rsync List| wrote: > This sparked a memory, and back in 2002 someone reported a similar > problem for AIX. They worked around it by undefining the > HAVE_SECURE_MKSTEMP define in config.h and rebuilding rsync. This would > seem to indicate that the mkstemp() call is not compatible with large > file systems, probably because it is not calling the right open() call > in the library (on systems where large- file support redefines functions > like open() into open64()).
Bingo! Great memory you have there, Wayne. ;-) This did the trick on the CVS version, and I suspect it will work on older versions, too. > Can you check to see if there is a mkstemp64() function available on > HP-UX? Alas, no. The mkstemp man page suggests using tmpfile() instead, which generally means that HP won't fix any problems. ----- mktemp(3C) Remarks: These functions are provided solely for backward compatibility and importability of applications, and are not recommended for new applications where portability is important. For portable applications, use tmpfile() instead (see tmpfile(3S)). ----- The tempnam()/tmpfile() combination seems particularly difficult to use compared with mkstemp(). I especially liked this warning: ----- tmpnam(3S) WARNINGS Between the time a file name is created and the file is opened, it is possible for some other process to create a file with the same name. This can never happen if that other process is using these functions or mktemp, and the file names are chosen such that duplication by other means is unlikely. ----- At least HP documents their race conditions, eh? :( -- Steve -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html