bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#6657: mkstemp on cygwin creates binary files


From: Paolo Bonzini
Subject: bug#6657: mkstemp on cygwin creates binary files
Date: Sat, 17 Jul 2010 08:13:59 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Thunderbird/3.0.5

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]