apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Lamanna" <james.lama...@appliedminds.com>
Subject Temporary Files
Date Tue, 25 Mar 2003 16:58:08 GMT
It seems like apr_file_mktemp should guarantee that it will return a
file that can be opened, instead of leaving that job up to the caller to
pass in an appropriate template that includes a writable path.

So it seems to me that we should be using something like tmpfile() so
that the location is appropriately picked as a "temporary file
location".
Unfortunately, tmpfile() returns a FILE* which is not exactly what we
want, but it is the safest function (and probably most portable) to use
considering that all others (tempnam, tmpnam, and also mkstemp (which we
do use)) are either marked as deprecated or "don't use".

--James


Mime
View raw message