Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2324: Use of tmpnam may produce spurious test results
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-11-28 23:15:21
#2324: Use of tmpnam may produce spurious test results
---------------------------+------------------------------------------------
Reporter: dave | Owner: ramey
Type: Bugs | Status: reopened
Milestone: Boost 1.37.0 | Component: serialization
Version: Boost 1.36.0 | Severity: Problem
Resolution: | Keywords:
---------------------------+------------------------------------------------
Comment (by mikhailberis):
Actually, you can use mkstemp to create the file while providing a pattern
for the temporary file, and be sure that the file is there when the call
returns. This means you don't need to use the file descriptor it returns
and just need to use the generated filename of the temporary file
afterwards.
You can even close the file descriptor returned by mkstemp immediately to
avoid leaking open file descriptors.
I'll try to come up with the patch to illustrate what I mean by this.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/2324#comment:7> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC