GNU bug report logs - #6657
mkstemp on cygwin creates binary files

Previous Next

Package: coreutils;

Reported by: Paolo Bonzini <bonzini <at> gnu.org>

Date: Fri, 16 Jul 2010 20:40:02 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paolo Bonzini <bonzini <at> gnu.org>
To: Eric Blake <eblake <at> redhat.com>
Cc: 6657 <at> debbugs.gnu.org, Paul Eggert <eggert <at> CS.UCLA.EDU>
Subject: bug#6657: mkstemp on cygwin creates binary files
Date: Mon, 19 Jul 2010 18:31:02 +0200
On 07/19/2010 03:28 PM, Eric Blake wrote:
> By the way, I don't see your patch for using mkostemp on cygwin in
> git://git.sv.gnu.org/sed.git; am I missing something, or is that not the
> latest git repository for sed?

I wanted to make sure you liked it before pushing. :)  I'll now push it.

I also experimented with forcing "wt" or "wb" depending on the presence 
or absence of --binary, but I convinced myself that at least using "wt" 
is wrong.

For now, I won't change the behavior of building the file in /tmp. 
While this may make rename not atomic, it can be "corrected" anyway by 
setting TMPDIR=. in the environment.  By comparison, "perl -i" is 
implemented using unlink+open which is not atomic so it's unlikely that 
anyone is relying on atomicity (and also wastes quota like TMPDIR=. 
would do).

Paolo




This bug report was last modified 13 years and 315 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.