From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#15015: Fix some minor races in hosts lacking mkostemp Date: Sat, 03 Aug 2013 14:26:20 -0700 Organization: UCLA Computer Science Department Message-ID: <51FD757C.401@cs.ucla.edu> References: <51FCB3D5.7070704@cs.ucla.edu> <83mwozxj84.fsf@gnu.org> <83k3k3xi36.fsf@gnu.org> <51FD1663.6040501@cs.ucla.edu> <83d2puygbs.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1375565241 31125 80.91.229.3 (3 Aug 2013 21:27:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 3 Aug 2013 21:27:21 +0000 (UTC) Cc: 15015@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 03 23:27:20 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V5jM7-0002Og-4B for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Aug 2013 23:27:19 +0200 Original-Received: from localhost ([::1]:41141 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5jM6-0007RW-O0 for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Aug 2013 17:27:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5jLx-0007R9-CB for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2013 17:27:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V5jLq-00021t-Q7 for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2013 17:27:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44288) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5jLq-00021p-Mr for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2013 17:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1V5jLq-0007CG-7H for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2013 17:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Aug 2013 21:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15015 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 15015-submit@debbugs.gnu.org id=B15015.137556519027580 (code B ref 15015); Sat, 03 Aug 2013 21:27:02 +0000 Original-Received: (at 15015) by debbugs.gnu.org; 3 Aug 2013 21:26:30 +0000 Original-Received: from localhost ([127.0.0.1]:38604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V5jLJ-0007Am-HS for submit@debbugs.gnu.org; Sat, 03 Aug 2013 17:26:29 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:52716) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V5jLG-0007AV-Q3 for 15015@debbugs.gnu.org; Sat, 03 Aug 2013 17:26:28 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id F00C3A60035; Sat, 3 Aug 2013 14:26:20 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F2qk0Itgiafd; Sat, 3 Aug 2013 14:26:20 -0700 (PDT) Original-Received: from [192.168.1.9] (pool-71-108-49-126.lsanca.fios.verizon.net [71.108.49.126]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 450CFA60032; Sat, 3 Aug 2013 14:26:20 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 In-Reply-To: <83d2puygbs.fsf@gnu.org> X-Enigmail-Version: 1.5.2 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:76945 Archived-At: On 08/03/2013 07:55 AM, Eli Zaretskii wrote: > gettimeofday, open, and lstat are implemented by Emacs in w32.c. At > lest the last 2 are not equivalent to what gnulib uses. The lack of equivalence shouldn't matter. The lstat call (though it is compiled) won't be used by Emacs's use of the mkostemp module on Microsoft platforms, so it's OK. mkostemp always calls 'open' with O_CREAT | O_EXCL; in that case sys_open is just a simple wrapper around _open, so that should be OK too. And gettimeofday, as you mentioned, isn't a problem. >> Presumably nt/configure.bat and makefile-w32.in could be updated >> to compile the new files. This sort of thing should be routine, >> if that avenue is still supported. > > This "support" needs volunteers, which didn't yet show up. If nobody's supporting it, then it's not really supported. It's not a big deal -- if someone wants to start supporting that build mechanism again, it'd be an easy-enough task. In the meantime we needn't let a deprecated and apparently-unsupported build mechanism get in the way of fixing bugs in mainstream builds. > We can always install the gnulib stuff for those other platforms Yes, that's a given. We need to do that, to fix the race condition bugs in OS X, Solaris, etc. > and work around it on Windows. I'm trying to help save work in the Windows port, by having Windows Emacs use Gnulib mkostemp (which will be in the source code anyway) the same way it's being used on OS X etc. If this approach is feasible, it should save us all some work; if not, it should be easy for a Windows expert to work around any problems in w32.c and/or msdos.c.