This is the mail archive of the
mailing list for the Cygwin project.
Re: pdksh package: Error when issuing a 'typeset -r' statement
On Tue, May 13, 2008 at 9:33 PM, Matthew Pettis
> 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
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:
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 <firstname.lastname@example.org>
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html