This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [patch, libstdc++, testsuite] Modify tests to use tmpnam()
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>, Janis Johnson <janis187 at us dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Wed, 03 Mar 2010 14:31:38 -0800
- Subject: Re: [patch, libstdc++, testsuite] Modify tests to use tmpnam()
- References: <201003032135.o23LZur08153@lucas.cup.hp.com> <4B8EDF79.6020704@oracle.com>
- Reply-to: sje at cup dot hp dot com
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