From: "Larry Hall (RFK Partners, Inc)" <lhall@rfk.com>
To: robert.jan.schutten@philips.com, <cygwin@sources.redhat.com>
Subject: Re: Broken stdio using sh.exe?
Date: Tue, 06 Mar 2001 08:38:00 -0000 [thread overview]
Message-ID: <4.3.1.2.20010306112805.025d8390@pop.ma.ultranet.com> (raw)
In-Reply-To: <0056890023232834000002L942*@MHS>
At 05:11 AM 3/6/2001, robert.jan.schutten@philips.com wrote:
>The problem:
>------------
>
>Using bash to read from stdin works as expected:
>
>schutten@PC6868 ~/tmp
>$ cat test.bin | ./readbin.bash
>61 62 63 64 1a 61 62 63
>
>Using sh to read from stdin stops after the ^Z (hex: 1a) character:
>
>schutten@PC6868 ~/tmp
>$ cat test.bin | ./readbin.sh
>4 bytes read, 8 expected
Actually, I thought bash had been changed to work like sh. The "problem"
is sh (or ash in this case) reads stuff in textmode. This allows it to not
trip over text mode input, which we see allot on Windows. However, this
means that it interprets characters in text mode, with all the pitfalls.
^Z is an EOF in text mode. Sorry, I don't have a solution for this problem.
NOTE - this response is not meant to open up the text vs binary mode debate
again. Follow-up comments on this thread should keep this in mind.
Thanks!
Larry Hall lhall@rfk.com
RFK Partners, Inc. http://www.rfk.com
118 Washington Street (508) 893-9779 - RFK Office
Holliston, MA 01746 (508) 893-9889 - FAX
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
next prev parent reply other threads:[~2001-03-06 8:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-06 2:10 robert.jan.schutten
2001-03-06 8:38 ` Larry Hall (RFK Partners, Inc) [this message]
2001-03-07 4:09 robert.jan.schutten
2001-03-07 8:19 ` Christopher Faylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4.3.1.2.20010306112805.025d8390@pop.ma.ultranet.com \
--to=lhall@rfk.com \
--cc=cygwin@sources.redhat.com \
--cc=robert.jan.schutten@philips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).