X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: Date: Tue, 13 May 2008 22:54:26 -0400 From: "Mark J. Reed" To: cygwin AT cygwin DOT com Subject: Re: pdksh package: Error when issuing a 'typeset -r' statement In-Reply-To: <82ba77b80805131833x59a01bb9n246aca58f996b427@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <82ba77b80805131833x59a01bb9n246aca58f996b427 AT mail DOT gmail DOT com> X-Google-Sender-Auth: 7798b03e855ecb49 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Tue, May 13, 2008 at 9:33 PM, Matthew Pettis wrote: > I installed cygwin with the 'pdksh' package. When I try to run issue > anything like the following: > > $ typeset -r x=1 > > I get the error: > > pdksh: x: is read only This is a known 8+-year-old bug in pdksh, which as far as I can tell is no longer being maintained by anyone (pointers to the contrary welcome). Why do you want pdksh? Isn't Gen-u-wine ksh available for Cygwin? Anyway, it's setting the readonly flag (typeset -r) before initializing the var instead of after. Nothing to do with Cygwin - you'll see the same error with pdksh 5.2.14 on NetBSD, OS X, Linux, etc. There's a patch that the Cygwin maintainer could apply to the package, which fixes this and two other bugs: http://www.cs.mun.ca/~michael/pdksh/files/pdksh-5.2.14-patches.1 There's also a patches.2; not sure what it fixes. Note that the file dates are bogus; the .1 patch dates back at least to November 2000. > P.S. - I also have a weird prompt, as seen below... Haven't > researched that, as it is not critical, but if anyone knows offhand... > > \[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n$ That's just a heavily bash-ified prompt as it appears in ksh; guess the Cygwin shell init files set that up in a "profile" somewhere instead of a "bash_profile". Tsk. Easiest fix is to just set PS1 to something more ksh-friendly in your own .profile. -- Mark J. Reed -- 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/