cannot create .hosts.b0WX1x : File exists

Dave Dykstra dwd at
Sat Dec 1 05:56:00 EST 2001

On Fri, Nov 30, 2001 at 12:08:19AM +0100, Rok Krulec wrote:
> Hello Dave,
> > What version of sources is that which had mkstemp at line 121 of
> > syscall.c?  It's surprising that you could just replace one with the other,
> > as mkstemp is supposed to open the file and mktemp is not supposed to.  It
> > sounds like you have some inconsistent version of the sources.
> rsync --version returns:
> rsync version 2.4.6  protocol version 24

Rsync 2.4.6 did not use mkstemp at all.  A comment in receiver.c says
    mktemp is deliberately used here instead of mkstemp.
and line 120 of syscall.c calls mktemp.  I suspect you had a locally hacked
version of rsync source in which someone changed the mktemp call to
mkstemp, and you just changed it back.  I don't have any 2.4 kernel systems
with libc-2.2.1, but I tried a 2.4 kernel with a later libc and mktemp and
mkstemp worked as expected.

Ah, I bet I know what happened.   I see that gcc warns when you use mktemp:
    the use of `mktemp' is dangerous, better use `mkstemp'
so somebody person must have thought they could just replace one with the
other without looking at the man page.

- Dave Dykstra

More information about the rsync mailing list