[patch] use mkstemp instead of mktemp.
Muthukumar Ratty
muthu@iqmail.net
Wed Jul 2 06:47:00 GMT 2003
> > >
> > > You can't just mechanically replace mktemp() with mkstemp(). They
> > > have different return values.
> > >mkstemp() returns the newly opened
> > > file.
> >
> > and also modifies the template properly so I think it should be ok.
>
> Note that blindly ignoring the return value of mkstemp() and then using
> the modified template to open the file will create exactly the same race
mkstemp actually creates the file. so when we open, it should be
unique.... am i missing something?
> condition that mkstemp() was designed to fix! You'll remove the link
> time warning, but not fixed the problem the warning was warning about.
>
> Simon.
> --
> Simon Burge <simonb@wasabisystems.com>
> NetBSD Development, Support and Service: http://www.wasabisystems.com/
>
More information about the Binutils
mailing list