This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, libstdc++, testsuite] Modify tests to use tmpnam()


On Wed, 2010-03-03 at 23:15 +0100, Paolo Carlini wrote:
  
> Ok. Actually, it seems to me we should use tmpnam more consistently -
> after all it's a perfectly standard C89 facility - instead of inventing
> names here and there for temporary files. Can you add a one-line comment
> about that before the arrays?
> 
> Thanks,
> Paolo.


I am not sure what kind of comment you want.  Maybe something like:

// Use tmpnam to create a unique name for the FIFO.


Hm, I just happened to look at the linux man page for tmpnam (as opposed
to the HPUX one) and noticed this:

| BUGS
|       Never use this function.  Use mkstemp(3) or tmpfile(3) instead.

But I don't think either of those routines can create a FIFO like we are
doing in these tests so this seems like a bogus comment in the man page.

Steve Ellcey
sje@cup.hp.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]