🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #11544

KSH fixes for SunOS 4.x and the Sun386i

#11544
From: Scott Hall
Date: Tue, 14 Mar 1989 17:57
64 lines
2881 bytes
Problem report and fixes for KSH-I under SunOS 4.X and the Sun386i.

Following are some bug fixes that will need to be applied to 'ksh-i' in
order for it to operate properly under SunOS 4.X.  In addition to that, I
am including changes that will allow 'ksh-i' to work on the Sun386i
properly.  The changes that will be at the end of this posting will
correct the following problems that I have seen with 'ksh-i'.

   1.  Ksh-i will go into an infinite loop if the user is running
   Sunview, and selects the 'quit' option from the title bar menu.
   Only a SIGKILL will terminate it.  Caused by an errno value that
   was not expected.

   2.  Ksh-i will dump core if the user executes the 'kill -l' (that's
   lower case 'L', not 1) to get a printout of the signals that can be
   used.  Caused by a corrupted stack.  Sun386i only.

   3.  If parameter substitution is used and nothing is within the
   accent marks ( var=`` ), ksh-i will dump core.  Caused by a
   de-referenced null pointer.  Sun386i only.


I have seen postings on the net indicating that the next release of 'ksh'
from the Toolchest will fix the SunOS 4.X problems.  I am not sure about
the fixes related to the Sun 386i.  These changes will at least help the
people that don't want to upgrade to the latest version right away.  The
changes are quite simple to apply, therefore I didn't bother with a
context diff, and only supply the changed lines.


edit.c   Fixes problem #1 listed above.

179c179
<               if(errno!=EBADF && errno!=ENOTTY)
---
>               if(errno!=EBADF && errno!=ENOTTY && errno != ENXIO )
200c200
<               if(errno!=EBADF && errno!=ENOTTY)
---
>               if(errno!=EBADF && errno!=ENOTTY && errno != ENXIO )


builtin.c  Fixes problem #2 listed above.

1295c1295
<       char *names[MAXTRAP+1];
---
>       char *names[MAXTRAP+1024];


macro.c  Fixes problem #3 listed above.

553,554c553,554
<       d = t->tretyp;
<       if(!subflag && !t->treio && (d&COMMSK)==TCOM && blt_no(d)>SYSSPECIAL)
---
>       if ( t ) d = t->tretyp;
>       if(!subflag && t && !t->treio && (d&COMMSK)==TCOM && blt_no(d)>SYSSPECIAL)


Robert S. Hall
Chemical Abstracts Service      Columbus, Ohio 43210    (614) 447-3600 X2027
UUCP:   ..!osu-cis!chemabs!rsh27, ..!n8emr!hall
BITNET: rsh27 at CAS
Technical Details
Message-ID: <8903022229.AA26093@tut.cis.ohio-state.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request
From: chemabs!rsh27@cis.ohio-state.edu (Scott Hall)
Newsgroups: comp.sys.sun
Subject: KSH fixes for SunOS 4.x and the Sun386i
Keywords: Software
Message-ID: <8903022229.AA26093@tut.cis.ohio-state.edu>
Date: 14 Mar 89 17:57:46 GMT
Sender: usenet@rice.edu
Organization: Sun-Spots
Lines: 64
Approved: Sun-Spots@rice.edu
Original-Date: Wed, 1 Mar 89 13:47:35 est
X-Sun-Spots-Digest: Volume 7, Issue 199, message 5 of 16