X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Lewis Hyatt Subject: Re: igncr vs text mode mounts, performance vs compatibility Date: Thu, 26 Oct 2006 15:34:24 +0000 (UTC) Lines: 21 Message-ID: References: <1160655422743 DOT antti DOT nospam DOT 1605718 DOT wGO_WJ9D1NlId3tB-z6Qig AT luukku DOT com> <20061012123406 DOT GA30908 AT trixie DOT casa DOT cgf DOT cx> <452EA386 DOT 9010201 AT qualcomm DOT com> <20061012212011 DOT GA8535 AT trixie DOT casa DOT cgf DOT cx> <452EFDDB DOT 1010301 AT qualcomm DOT com> <452F8719 DOT 9060300 AT cygwin DOT com> <4536BC88 DOT 3030003 AT qualcomm DOT com> <4536C922 DOT 4090807 AT qualcomm DOT com> <45376CBF DOT 1030104 AT byu DOT net> <453EA9C1 DOT 8060402 AT byu DOT net> <45401C68 DOT 7080706 AT byu DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com > There are a few other things to think about with your initial attempt. > Right now, igncr is an all or nothing setting, can be inherited into child > processes via SHELLOPTS, but can only be changed by explicit user action. > Your patch only ever turns it on without user intervention, not off. You > are changing the global igncr variable even though you described your goal > as a per-file setting; so if bash reads two files in a row, first with > \r\n, and the second with \n only, the second inherits the fact that the > first decided to turn on igncr. At which point, why not just make igncr > the default to begin with? So it sounds like the effort to make a > per-file decision work correctly is getting bigger and bigger, with less > and less perceivable benefits. I see, I misunderstood the behavior of shell options like that, I thought it only applied to the current bash process. It would be straightforward just to create a new global variable instead of using igncr, and to handle your other points, but in any case it sounds like you have made an effort to keep bash POSIX compliant, and we should just respect that behavior and rely on setting igncr as the default. -lewis -- 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/