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: Paul Eggert <eggert <at> CS.UCLA.EDU>
Cc: 6657 <at> debbugs.gnu.org
Subject: bug#6657: mkstemp on cygwin creates binary files
Date: Sat, 17 Jul 2010 08:13:59 +0200
On 07/16/2010 11:47 PM, Paul Eggert wrote:
> On 07/16/10 13:27, Paolo Bonzini wrote:
>
>> I fixed it by using instead mkostemp(template, 0).  From a quick "git
>> grep", it seems like sort and tac are affected by the bug in coreutils.
>
> tac access the temp file in binary mode, so there's no problem there.
>
> I don't see the problem with 'sort' offhand.  Why would the user care whether
> line endings in sort's temp files are \r\n or \n?  Using binary mode is a
> bit faster and more reliable, surely.
>
> Or is there some problem if the file descriptor is created with O_BINARY
> and then fdopen is called with "w" (and not "wb")?  I guess "sort" does
> that on Cygwin now.

No idea.  I just thought a heads-up was in order...

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.