delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/01/06/04:45:06

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 053233851C1F
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=maxrnd.com
Authentication-Results: sourceware.org; spf=none smtp.mailfrom=mark AT maxrnd DOT com
Subject: Re: FILE_ATTRIBUTE_TEMPORARY ?
To: cygwin AT cygwin DOT com
References: <7990f8e3-ebd7-c865-58da-ddb97bd59d5f AT gmail DOT com>
From: Mark Geisert <mark AT maxrnd DOT com>
Message-ID: <295cd16c-9f43-a6b7-9a48-a3aa52310a4f@maxrnd.com>
Date: Wed, 6 Jan 2021 01:44:04 -0800
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
Firefox/52.0 SeaMonkey/2.49.4
MIME-Version: 1.0
In-Reply-To: <7990f8e3-ebd7-c865-58da-ddb97bd59d5f@gmail.com>
X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, SPF_HELO_NONE, SPF_NONE, SUBJ_ALL_CAPS,
TXREP autolearn=no autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 1069ijdI030421

Hi Noel,

Noel Grandin via Cygwin wrote:
> Hi
> 
> Does the cygwin
>      tempfile()
> API use the Win32
>      FILE_ATTRIBUTE_TEMPORARY
> 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.
Thanks!

..mark
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019