This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ANNOUNCEMENT] Updated: bash-4.3.39-2

On 09/28/2015 08:30 AM, Mikhail Usenko wrote:

> But catching that bug (in upstream?) hasn't changed anything
> at least on my installation:

Okay, so it sounds like your issue is separate.

> ---%<---<>---%<---
> #! /bin/bash
> bash -version | head -n1
> echo
> sender()
> {
>   echo -n  '\r\n' >&2
>   echo -ne '\r\n'

'echo -n' and 'echo -e' are non-portable (even in bash; because I can
use 'shopt -s xpgecho' to get POSIX-mandated behavior).  Use 'printf'

> receiver()
> {
>   t=""
>   while read t || [ "$t" ]; do
>     echo -ne ": \t"
>     od -A n -t x1  <<<"$t"
>   done  >&2
> }
> # implicit pipe
> receiver < <(sender)
> # explicit pipeline
> sender | receiver

Okay, I can see the disappearing \r even on a binary mount, so it
appears to be unrelated to the fix for text mounts.

Meanwhile, doing something like this (with a shorter sender):

# sender | od -An -tx1
\r\n\r\r\n\r\r\r\n 0d 0a 0d 0d 0a 0d 0d 0d 0a

shows that the pipeline is not eating the \r, but rather it appears to
be an issue in 'read'.  I'm still investigating, but thanks for the
recipe, as it gives me something to focus on.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library

Attachment: signature.asc
Description: OpenPGP digital signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]