From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7360 invoked from network); 24 Oct 2005 04:36:56 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 24 Oct 2005 04:36:56 -0000 Received: (qmail 41079 invoked from network); 24 Oct 2005 04:36:50 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 24 Oct 2005 04:36:50 -0000 Received: (qmail 3193 invoked by alias); 24 Oct 2005 04:36:47 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21914 Received: (qmail 3184 invoked from network); 24 Oct 2005 04:36:46 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 24 Oct 2005 04:36:46 -0000 Received: (qmail 40807 invoked from network); 24 Oct 2005 04:36:46 -0000 Received: from 69-12-150-177.dsl.static.sonic.net (HELO ripple.fruitbat.org) (69.12.150.177) by a.mx.sunsite.dk with SMTP; 24 Oct 2005 04:36:45 -0000 Received: (from daemon@localhost) by ripple.fruitbat.org (8.10.2/8.8.8/PAC-1.3) id j9O4Yit11158; Sun, 23 Oct 2005 21:34:44 -0700 Received: from ming.fruitbat.org(192.168.55.2) by ripple.fruitbat.org via smap (V2.1/2.1+anti-relay+anti-spam) id xma011154; Sun, 23 Oct 05 21:34:02 -0700 Received: from gremlin.fruitbat.org (IDENT:202@gremlin.fruitbat.org [192.168.55.4]) by ming.fruitbat.org (8.12.10/8.10.2/PAC-1.6) with ESMTP id j9O4Y0bT004923; Sun, 23 Oct 2005 21:34:00 -0700 Date: Sun, 23 Oct 2005 21:34:00 -0700 (PDT) From: "Peter A. Castro" To: Bart Schaefer cc: zsh-workers@sunsite.dk Subject: Re: PATCH: Re: Superfluous CRs trouble completion routines in Cygwin In-Reply-To: <1051023191106.ZM14745@candle.brasslantern.com> Message-ID: References: <87irvzys44.fsf@trews52.bothi.fi> <1051015180240.ZM22900@candle.brasslantern.com> <1051016002252.ZM23495@candle.brasslantern.com> <87y84owe0f.fsf@trews52.bothi.fi> <1051020145129.ZM2623@candle.brasslantern.com> <87d5lzw13l.fsf@trews52.bothi.fi> <1051021154525.ZM7511@candle.brasslantern.com> <1051023191106.ZM14745@candle.brasslantern.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.0.4 On Sun, 23 Oct 2005, Bart Schaefer wrote: > On Oct 23, 10:33am, Peter A. Castro wrote: > } > } Since we are talking about console input, though, there may be a tty > } setting to control weither CRs are passed to the input stream. I'll see > } if I can investigate this. > > I'm not all that familiar with how Cygwin simulates UNIX pipelines. We > are talking about command output piped to the "read" builtin -- is that > the same as console input? Pipes in Cygwin are a, somewhat, strange beast, because the underlying mechanism is Windows pipes (the working of which is a topic for a different discussion). Pipes can be effected depending on the CYGWIN env var. If you set: CYGWIN=binmode Then everything is sent through the pipe (this is the default). If, however, you set: CYGWIN=nobinmode Then CRLF will be translated to LF. Unfortunately, this is a global and would effect every pipe opened (though it can be overridden, but would mean special case shell code everywhere). > In any case, stripping CRs from the i/o stream would only mask the > problem. It'd be at least as helpful to know why adding a CR to the > IFS value causes a segmentation fault. Agreed. I haven't been able to repo this scenario (yet). If whoever can repo it, could attach a debugger to the shell and the cause it to fault, they should be able to catch where it's faulting (though finding the correct thread might be a little tricky). -- Peter A. Castro or "Cats are just autistic Dogs" -- Dr. Tony Attwood