This is the mail archive of the cygwin@cygwin.com 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: one byte reads in bash


Hi...

cygwin-owner@cygwin.com wrote on 12.06.2003 19:05:35:
> Just so that the list thread gets the info, I had a private reply from Dan
> Vasaru, who referred me to his patch to bash here:
>
> http://sources.redhat.com/ml/cygwin/2002-09/msg00446.html
>
> I applied his patch to the current cygwin bash source (plus the three
> wide-character compilation fixes for bash on current cygwin mentioned
> elsewhere in the list archives)  and the one-byte-read problem goes away.
> (The patch turns off the bash cygwin-specific detection for a non-seekable
> file handle and enables existing bash code to get the seeking-in-text-mode
> stuff right).
>
> i.e. bash now reads script files in buffered chunks rather than
> character-at-a-time. (note - I don't mean character-at-a-time buffered by
> stdio, I mean char-at-a-time from the O/S).
>
> I originally noticed the problem with a network analyser, which also shows
> the fix. For a 2.5Kbyte script, the patched bash does 2 reads (two network
> reply/response data packets) versus the current cygwin bash which does
> 2500 network read/reply packets. Note that cygwin strace suggests that the
> problem also occurs for scripts on local disk, although it obviously has
> less impact in that case.
>
> For my money, this is a great patch. I've not tested it for other ill
> effects as yet, but the read issue is certainly resolved.

The one byte read problem is IMHO really a pain in a well known part of everyones body...

A former colleague of mine posted this obervation already here...
(Unfortunately with a bad subject - Sorry for this - it wasn't ment that way - Cygwin is great!!!)
http://sources.redhat.com/ml/cygwin/2001-07/msg01420.html

Is it possible to apply the fix mentioned above once to the "regular" cygwin bash, so
one does not always need to recompile bash on his own?

Thanks Roland



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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