delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/05/13/22:54:58

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <f60fe000805131954o43dc98fcoc79c7d93b8999fe6@mail.gmail.com>
Date: Tue, 13 May 2008 22:54:26 -0400
From: "Mark J. Reed" <markjreed AT mail DOT com>
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
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
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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
<matthew DOT pettis AT gmail DOT com> 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 <markjreed AT gmail DOT com>

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019