From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from m0.truegem.net (m0.truegem.net [69.55.228.47]) by sourceware.org (Postfix) with ESMTPS id 814B7385DC33 for ; Fri, 5 Feb 2021 10:31:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 814B7385DC33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=maxrnd.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=mark@maxrnd.com Received: from localhost (mark@localhost) by m0.truegem.net (8.12.11/8.12.11) with ESMTP id 115AVAFk063285 for ; Fri, 5 Feb 2021 02:31:11 -0800 (PST) (envelope-from mark@maxrnd.com) X-Authentication-Warning: m0.truegem.net: mark owned process doing -bs Date: Fri, 5 Feb 2021 02:31:10 -0800 (PST) From: Mark Geisert X-X-Sender: mark@m0.truegem.net To: cygwin-developers@cygwin.com Subject: Extending domain of O_TMPFILE? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_NONE, SPF_NONE, 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-developers@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component developers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2021 10:31:16 -0000 Hi folks, I've been following up on a response I made to a Cygwin user in https://cygwin.com/pipermail/cygwin/2021-January/247306.html . I've figured out that Cygwin's implementation of the open() flag O_TMPFILE follows Linux in that one can't specify the name of a file when using this flag. User supplies only the path, and Cygwin chooses an obscure file name for you. That means the OP's suggested improvement of applying O_TMPFILE semantics to files created by tmpfile() won't work. Could we consider expanding the domain of O_TMPFILE so that the user can supply a name for the temporary file rather than just the path to its directory? I've been playing around with proof-of-concept code but I want to make sure this is acceptable before submitting implementation patches. This would be a Cygwin-specific enhancement to a Linux-specific feature. I haven't checked yet if the BSDs have O_TMPFILE in any form. Thanks for any feedback! ..mark