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


Message #8 received at 6657 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> CS.UCLA.EDU>
To: Paolo Bonzini <bonzini <at> gnu.org>
Cc: 6657 <at> debbugs.gnu.org
Subject: Re: bug#6657: mkstemp on cygwin creates binary files
Date: Fri, 16 Jul 2010 14:47:15 -0700
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.




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.