This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ITP] mksh-R31b-1 -- Enhanced version of the Korn shell


On Thu, 13 Sep 2007, Jari Aalto wrote:

> > Actually, let's hope that this time Jari answers my questions...  As I
> > said, if mksh is a full (and fully compatible) replacement for pdksh
>
> To my knowledge, it is. If someone has *.ksh files to try, please
> download and install that binary package and see it the mksh handles
> them.

Hmm, you seem to be contradicting that below...

> The developer is active and responsive.
>
> > I'm in favor of getting the newer package into the distro. Igor
>
> According to:
>
>     http://cygwin.com/ml/cygwin-apps/2006-05/msg00024.html
>
> The bug reports:
>
>     http://cygwin.com/ml/cygwin/2004-08/msg00112.html [1]
>     http://cygwin.com/ml/cygwin/2005-06/msg00202.html [2]
>     http://cygwin.com/ml/cygwin/2005-08/msg01382.html [3]
>     http://cygwin.com/ml/cygwin/2006-02/msg00448.html [4]
>
> They are not very clear, but I tried my best to reproduce.
>
> [1] Multiple "sourcing" of initializations files.
>
>     "The script that fails sources another script which loads a whole
>     bunch of functions.
>
>     The error happens when I call a function from a certain script, I
>     get this error. However, if I call it from a smaller script
>     (specially written to just call this function) it works"
>
> Not a problem under mksh. Multiple sourced files; function work. That is

This sentence seems truncated.  In any case, the bug report was too vague,
and I haven't had the time to investigate.

> [2] Memory allocation error
>
>     "/home/tbaker/u/bin/urlists[50]: internal error: alloc: freeing
>      memory outside of block (corrupted?)
>
>     By running the scripts in debug mode (set -x), I found that
>     the problem seemed to occur when declared functions (i.e.,
>     declared within the script) were invoked multiple times.
>     The functions would work at first, then stop working --
>     as if the functions somehow ate up the available memory."
>
> I invoked function 1000 times in a loop, no malloc errors.

I have a testcase for this one (attached).  This has nothing to do with
functions.  I think it's a matter of not handling long filenames properly
(an off-by-one error?).

> [3] Prompt which gets repeated if it's multiline
>
>     "keying <ESC>/ results in ....
>
>     WS-XP-4960: /home/rthompso>
>     WS-XP-4960: /home/rthompso>
>     WS-XP-4960: /home/rthompso>
>     $ /"
>
> Not applicaple. ESC-/ key combination doe snot exist in mksh.
> Multiline prompts work without promlems.

Sure it exists.  You have to "set -o vi" first.  But this one I can't
reproduce in the current pdksh, either.

Also, this one was #4 -- you missed #3, which was about tab completion and
quoting spaces and special characters (which is reproducible).

Since we're testing known issues, here's another one I missed:
<http://cygwin.com/ml/cygwin/2005-01/msg00073.html>.  Again, reproducible
in current pdksh.

Anyway, I don't mind a test release of this -- if people find no problems
with their ksh scripts, we can switch over to mksh (and switch the
maintainership over to you).
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Belief can be manipulated.  Only knowledge is dangerous.  -- Frank Herbert

Attachment: sampleBugPdksh.ksh
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]