[aspect-devel] mktemp failure

Eric Heien emheien at ucdavis.edu
Thu May 3 08:13:14 PDT 2012


I'm not sure it's consistent among all platforms, but on the ones I've checked it doesn't say mkstemp() deletes the file, rather tmpfile() does (which actually doesn't delete but unlinks).  I'll try rewriting that section with mkstemp() today and see if it works.

-Eric

On May 3, 2012, at 7:00 AM, Wolfgang Bangerth wrote:

> 
>>> I think mkstemp could work (I don't know
>>> why I didn't find that). I'm not enough of a C programmer to know what
>>> it means that the function returns an 'int' -- is that the same as
>>> FILE*? And how do I convert it to a C++ std::ostream?
>> 
>> Let me quote yourself, Wolfgang:
>>> The only one one should use is mkstemp
>>> but this function creates a file handle that points to a file that
>>> is destroyed upon closing the file handle. How am I supposed to
>>> copy this file around then if it gets deleted right away?
> 
> How short my memory is. And how good to have assistants who can help me 
> figure out my past thought processes :-)
> 
> That said, the reason why I didn't remember that statement is because my 
> laptop's man page says nothing about deleting the file again. Do you 
> also remember where I had that statement from?
> 
> Cheers
>  W.
> 
> -- 
> ------------------------------------------------------------------------
> Wolfgang Bangerth               email:            bangerth at math.tamu.edu
>                                 www: http://www.math.tamu.edu/~bangerth/
> 
> _______________________________________________
> Aspect-devel mailing list
> Aspect-devel at geodynamics.org
> http://geodynamics.org/cgi-bin/mailman/listinfo/aspect-devel



More information about the Aspect-devel mailing list