Mark Geisert
Wed Jan 6 09:44:04 GMT 2021

Hi Noel,

Noel Grandin via Cygwin wrote:
> Hi
> Does the cygwin
>      tempfile()
> API use the Win32
> flag on the files it creates?
> Asking because that makes a fairly significant performance difference when 
> creating very short lived temp files.

Good question!  If one specifies O_TMPFILE as one of the flags on an open() call, 
Cygwin does set that Win32 attribute as desired.  Unfortunately, Cygwin's 
tmpfile() is supplied by newlib and it does not specify O_TMPFILE on its 
underlying open() call.

That looks like a bug to me, unless I'm missing something subtle there; I'll 
submit a patch and find out.


More information about the Cygwin mailing list