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: Eric Blake
Subject: bug#6657: mkstemp on cygwin creates binary files
Date: Mon, 19 Jul 2010 10:51:56 -0600
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 Mnenhy/0.8.3 Thunderbird/3.0.5

On 07/19/2010 10:48 AM, Paolo Bonzini wrote:
> On 07/19/2010 06:33 PM, Eric Blake wrote:
>> Yuck - that means if /tmp is mounted differently than ., then using
>> mkostemp(,0) will force the wrong line endings (converting binary to
>> text, or converting text to binary, depending on which direction the
>> mismatch is between the mount modes).  If you aren't creating the temp
>> file in the same mount point as the target, then you cannot blindly rely
>> on automatic mount point file modes to do the right thing.
> 
> It's buggy anyway in all released versions of sed.  I'll probably make
> the change---just, not yet.

As a compromise, it is faster to at least document that the choice of
TMPDIR=. can help fix line ending issues with 'sed -i' on cygwin, until
such time as you actually do make some change on either the default
in-place location or more work on explicit mode matching when creating
the temp file.

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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