[comp.sys.ibm.pc] Some problems with the latest MKS Toolkit

cjoslyn@bingvaxu.cc.binghamton.edu (Cliff Joslyn) (02/03/90)

This is a simple bug report that I'm sending a copy of to the net. 
Perhaps these problems are in some way unique or sepcial to my
configuration.  In no way is this a general complaint against the MKS
company, which produces some of the finest software available for DOS.

I have MKS Toolkit v 3.1 running in configuration 5.  In 'inittab' I
have 'switch -', then I load a mouse driver, Superkey, and Sidekick
before running the shell.  I set ROOTDIR=c:/mks and run the shell with
the '-R 0' option for partial disk swapping. 

Problems:

1) Most of my scripts break in an annoying yet functional way.  I use
the Sidekick editor for most of my scripts.  For a script like this:

	# junk.ksh
	echo "Hello"

I'd get:

	% junk
	Hello
	junk.ksh 3: : not found

Basically, it's telling me I've got a bad EOF, and it's trying to
interpret a bad line.  Note that I have an extra carriage return
following 'echo "Hello"'.

Now here's the weird part: when I use a different editor, say
MicroEmacs, this doesn't happen.  Further, uEmacs writes the file out
with a size one more than SK, yet the look identical when I look at them
in a hex editor.  Note that ksh doesn't fail in earlier versions,
doesn't fail without that extra line at the EOF, and doesn't fail with:

	% sh -c junk.ksh

2) I have a script 'exdos.ksh':

	# exdos.ksh
	exec $COMSPEC -e:4000

to exec command.com in place of sh.exe.  This worked fine in previous
versions, and when I needed an extra 30-40K of RAM was a cheap fix. 
Then when you exit from command.com:

	C> exit

ksh.exe reloads itself nicely.  This now hangs the machine.

3) A much smaller point: in Emacs editing mode of the shell, in the
previous version typing down-arrow when at the end of the history list
would give a blank line.  Now it gives an error bell.  Perhaps this is a
"feature"?

Any comments? I know that MKS listens in, so I'll hope for a reply
before I call them with this report.
-- 
O------------------------------------------------------------------------->
| Cliff Joslyn, Cybernetician at Large, cjoslyn@bingvaxu.cc.binghamton.edu
| Systems Science, SUNY Binghamton, Box 1070, Binghamton NY 13901, USA
V All the world is biscuit shaped. . .

andy@mks.com (Andy Toy) (02/06/90)

In article <2905@bingvaxu.cc.binghamton.edu> cjoslyn@bingvaxu.cc.binghamton.edu (Cliff Joslyn) writes:
>1) Most of my scripts break in an annoying yet functional way.  I use
>the Sidekick editor for most of my scripts.  

Some editors write ^Z at the end of a file while others do not.  When
the editors write out ^Z the file size includes this so the shell was
quite willing to accept this as an input line and was not ignoring ^Z.
This has been fixed.  Send e-mail to me if you are having problems
with this.

>2) I have a script 'exdos.ksh': exec $COMSPEC -e:4000
>	C> exit
>This now hangs the machine.

It is possible that you are exiting from your top-level shell.  It could
also be caused by SHELL being set wrong.  No memory is being saved by
exec'ing command.com from a subshell so using alias exdos="command -e:4000"
should work better since this will avoid invoking another subshell.  Does
the programme that you are attempting to run require command.com with a
larger environment?  The Korn Shell's environment size is not fixed, it
can be as large as 64kb, and using the transient shell reduces the
size of the shell by 64kb so it should be able to run most programmes.

>3) A much smaller point: in Emacs editing mode of the shell, in the
>previous version typing down-arrow when at the end of the history list
>would give a blank line.  Now it gives an error bell.  Perhaps this is a
>"feature"?

This is a feature :-)  You are actually editing a command from the shell
history file which has no blank lines.  If a blank line is needed to
type another command then ^C can be entered to interrupt the edit mode.
-- 
Andy Toy, Mortice Kern Systems Inc.,       Internet: andy@mks.com
  35 King Street North, Waterloo,       UUCP: uunet!watmath!mks!andy
      Ontario, CANADA N2J 2W9      Phone: 519/884-2270  FAX: 519/884-8861

cjoslyn@bingvaxu.cc.binghamton.edu (Cliff Joslyn) (02/06/90)

Apologies for carrying on by News, my mailer's broken to UUCP these days.

In article <1990Feb5.202345.6668@mks.com> andy@mks.com (Andy Toy) writes:
>In article <2905@bingvaxu.cc.binghamton.edu> cjoslyn@bingvaxu.cc.binghamton.edu (Cliff Joslyn) writes:
>>2) I have a script 'exdos.ksh': exec $COMSPEC -e:4000
>>	C> exit
>>This now hangs the machine.
>
>It is possible that you are exiting from your top-level shell.  

I should have clarified this: I also have an alias:

	alias -x exdos=". /mks/sh/exdos.ksh"

So when I enter:

	% exdos

I am *intending* to replaced my top-level shell with command.com.  This
*worked* on the previous version.  This is screwed up, I know, but there
used to be a *reason* for all this fooling around. . .

>It could
>also be caused by SHELL being set wrong.  

I have: export SHELL=/mks/bin/sh.exe

>No memory is being saved by
>exec'ing command.com from a subshell so using alias exdos="command -e:4000"
>should work better since this will avoid invoking another subshell.  

Yes, but I want to use exec to replace sh.exe with command.com.

>Does
>the programme that you are attempting to run require command.com with a
>larger environment?  

My intent is to replace sh.exe with command.com since even with the new
transient shell I can squeeze out a bit more RAM.  Maybe that's no
longer useful, or the transient shell breaks exec.  

Let's try to simplify this: should this work from the top level shell in
config.  5? It hangs for me now:

	% exec command.com

>>3) A much smaller point: in Emacs editing mode of the shell, in the
>>previous version typing down-arrow when at the end of the history list
>>would give a blank line.  Now it gives an error bell.  Perhaps this is a
>>"feature"?
>
>This is a feature :-)  

Oh, those damned features. . .at least make them switch-settable?
-- 
O------------------------------------------------------------------------->
| Cliff Joslyn, Cybernetician at Large, cjoslyn@bingvaxu.cc.binghamton.edu
| Systems Science, SUNY Binghamton, Box 1070, Binghamton NY 13901, USA
V All the world is biscuit shaped. . .

robert@sysint.UUCP (Robert Nelson) (02/10/90)

cjoslyn@bingvaxu.cc.binghamton.edu (Cliff Joslyn) writes:


>I have MKS Toolkit v 3.1 running in configuration 5.  In 'inittab' I
>have 'switch -', then I load a mouse driver, Superkey, and Sidekick
>before running the shell.  I set ROOTDIR=c:/mks and run the shell with
>the '-R 0' option for partial disk swapping. 

>Problems:

>1) Most of my scripts break in an annoying yet functional way.  I use
>the Sidekick editor for most of my scripts.  For a script like this:

>	# junk.ksh
>	echo "Hello"

>I'd get:

>	% junk
>	Hello
>	junk.ksh 3: : not found

>Basically, it's telling me I've got a bad EOF, and it's trying to
>interpret a bad line.  Note that I have an extra carriage return
>following 'echo "Hello"'.

>Now here's the weird part: when I use a different editor, say
>MicroEmacs, this doesn't happen.  Further, uEmacs writes the file out
>with a size one more than SK, yet the look identical when I look at them
>in a hex editor.  Note that ksh doesn't fail in earlier versions,
>doesn't fail without that extra line at the EOF, and doesn't fail with:

>	% sh -c junk.ksh

This is caused by a "^Z" EOF character in your script.  For some reason MKS
changed something in the shell which doesn't like them anymore.  (Possibly
they are reading using binary mode and don't check for "^Z"?).  Anyways, the
shell is trying to exec() a program named "^Z" from line 3 of the script.

I had the same problem with scripts generated by PolyMake.  Fortunately it
has an option to not to place "^Z" in its files.  I am not familiar with
SideKick but you might see if there is a way you can turn the EOF character
off.

It sure took me a while to find that one :-(

>Any comments? I know that MKS listens in, so I'll hope for a reply
>before I call them with this report.
>-- 
>O------------------------------------------------------------------------->
>| Cliff Joslyn, Cybernetician at Large, cjoslyn@bingvaxu.cc.binghamton.edu
>| Systems Science, SUNY Binghamton, Box 1070, Binghamton NY 13901, USA
>V All the world is biscuit shaped. . .

Sorry I can't help you with the others.



-- 
Robert B. Nelson                               Systems Interface Inc.
Phone: (613) 727-5001                          223 Colonnade Road South
UUCP: uunet!mitel!sce!cognos!sysint!robert     Nepean, Ontario, CANADA, K2E 7K3

cjoslyn@bingvaxu.cc.binghamton.edu (Cliff Joslyn) (02/16/90)

FYI, I got a very prompt reply from Andy Perry (thanks Andy).  The ^Z
problem in scripts is a known bug.  The exec problem seems specific to
my environment (perhaps my BIOS, I'm going to try a new one), and the
no blank line at end of history is a "feature".
-- 
O------------------------------------------------------------------------->
| Cliff Joslyn, Cybernetician at Large, cjoslyn@bingvaxu.cc.binghamton.edu
| Systems Science, SUNY Binghamton, Box 1070, Binghamton NY 13901, USA
V All the world is biscuit shaped. . .