gno/bin/gsh/UpdateLog

592 lines
30 KiB
Plaintext
Raw Normal View History

GSH 2.0 UPDATES
^^^^^^^^^^^^^^^
Dec 30 98 [dmt] Added mutual exclusion to ~NEW and ~DISPOSE macros. Lack
of mutex could cause one fork to modify a memory table while
another fork was searching it, leaving one or both processes
in an infinite loop. This caused some recoding in nullfree
(shellutil.mac), since we have to unlock the mutex after
calling ~DISPOSE but before returning to the caller.
Dec 29 98 [dmt] For some sizes of the hash table, the hash command
would sometimes print an entry more than once. Made 2 changes
to sv_colprint (in sv.asm): 1) Ensure the number of columns is
never > number of entries. This is only a problem when there are
fewer than 6 files hashed. 2) Never look beyond the number of
entries stored in offtbl. Results could be affected by the
previous call to sv_colprint.
Dec 28 98 [dmt] Review code for mutual exclusion requirements.
= Change jsl to builtin subroutine near "foundit" in builtin.asm
into stack setup followed by rts, so that mutex is not required
to protect the setup and execution of the invocation.
= Add AliasMutex to protect data used by alias and unalias
commands (alias.asm)
= Remove pwdmutex from pwd command (builtin.asm).
= Remove mutex from dotods routine (dir.asm).
= Add DirMutex (for DirData) to dirs, pushd, and popd commands
(dir.asm).
= Add offtblmutex to sv_colprint routine (sv.asm).
= Change ErrorGS and SetGS calls so that parameter blocks are
on the stack for ShellExec (cmd.asm).
= Add lock/unlock of hashmutex to search routine so that the
hash function is protected. (hash.asm)
Dec 27 98 [dmt] Running a process in the background from inside a
script (not 'source', but executing the script as a command)
caused the script to wait for that background process to end.
Caused the script to run without waiting by checking for
background processing near beginning of "infork" (invoke.asm).
Because the parent process is the script, not gsh, when control
returns to gsh the script has terminated and the parent process
ID is 1 (null process). gsh cannot use its normal job control
commands, except "kill <pid>" (not "kill %<job>") works.
Dec 26 98 [dmt] Make gsh globbing work more like csh: if none of the
requested patterns are found, print "No match" and exit.
Dec 23 98 [dmt] At startup, if /etc/glogin, $HOME/glogin, or $HOME/gshrc
does not exist, skip "file not found" error message. (PR#100)
Dec 21 98 [dmt] Changes to this point checked-in to master archive.
Released as version 2.0d7
Dec 20 98 [dmt] For calls to system(), if input pointer is null or
lower level routines detect an error, return -1. This change
caused change to internal routine execute(): return -1 rather
than 0 when an error is detected.
Detect when non-forked builtin or directory name as command
is combined with piped I/O, and ensure that situation is
properly cleaned up. (Formerly, "clear | cat > /tmp/list"
would cause a nasty crash.)
Dec 18 98 [dmt] In execute() (cmd.asm), when child process isn't active
and has no entry in the pid list, assume that pchild() has
already set $status rather than forcing $status to 0.
Dec 17 98 [dmt] argv and argc parameters were reversed in PrintHistory().
This didn't make a difference until argc was checked for != 0.
Dec 16 98 [dmt] Added waitstatus address parameters to command() and
invoke() so completion status can be reported from unforked
builtin commands. Added code in execute() to set status
reported from unforked builtin commands.
Reviewed all built-in commands to ensure they report 0 for
no error and 1 for error.
Fixed memory corruption error when edit command had no
parameters (it called free1024 with random address).
Added usage strings for tset, hash, commands, and history.
Dec 13 98 [dmt] Resolved (or at least closed the window of opportunity
on) defects reported in Oct. 6 and 10 entries. When a process
terminated quickly [kill(pid,0) returned -1], that child's
termination could interfere with detecting the next child's
termination. Solution: Modify removejentry() (jobs.asm) to
return 1 if entry is in list (indicating we expected status
from it) and 0 if it isn't. Modify execute (cmd.asm) to get
status via wait() if and only if removejobentry() returns 1.
Previously, the following exec file often resulted in a hang:
# Create exec file
set tmpcmd=/tmp/testcmds
echo "echo Sourcing $tmpcmd" > $tmpcmd
echo "/bin/ps -l" >> $tmpcmd
chtyp -l exec $tmpcmd
# Source that file; usually doesn't return
source $tmpcmd
Dec 5 98 [dmt] If either glogin file rehashed (for login shells only),
that hash table's memory pointer was overwritten but not
deallocated in shell (shell.asm). Fixed by adding a call to
dispose_hash before calling hashpath.
Nov 29 98 [dmt] Fix memory leak: deallocate name returned by hash
search in invoke (invoke.asm) and which (builtin.asm).
Deallocate path string in invoke by passing it as a new
parameter to argfree, so that it is deallocated only after
the child process is done with it.
Nov 28 98 [dmt] When allocating memory for return string containing
full path in search (hash.asm), add lengths of path + name + 1
rather than path + 33.
Nov 18 98 [dmt] Fix memory leak: when null command was encountered,
the empty command line and argv array were not deallocated.
Nov 12 98 [dmt] prefix command without parameters should not try to
deallocate PRecPath, since it was not used. Causes corruption
when PRecPath contains a value; fixed by jumping to done
rather than finish. Also, jump into "allloop" earlier and
avoid 9 lines of duplicate code.
Nov 2 98 [dmt] Changes to this point checked-in to master archive.
Released as version 2.0d6
Oct 29 98 [dmt] Defect introduced into 2.0d5 fixed: when background job
completed, GetCmdLine thought there was an error on stdin. It
printed a bogus error message and then quit.
Oct 26 98 [dmt] Changes to this point checked-in to master archive.
Released as version 2.0d5
Changes for gsh version 2.0d5: Add quotes around null parameters from the command line so they will be parsed properly (resolves PR#84). Output piped to an unfound command caused gsh to terminate, due to an interface change to the GNO 2.0.6 version of getpgrp(2): it now returns the process group of the caller. To get the process group number for the pid passed as a parameter pid, the call has to be made to _getpgrp(2). In addition to fixing invoke.asm, updates were also made in jobs.asm. When directory stack is full, pushd, reports a new error message: 'pushd: Directory stack full'. (Previously, 50 pushds would cause a crash.) When parameter passed to "pushd +n" is <= 0, report a new error message: 'pushd: Invalid number'. (Previously, tried to chdir to the parameter.) When a command appends to stderr (e.g., echo test >>&/tmp/err), stdin was closed, due to errappend being defined as pipefds+2 rather than pipefds+4 in cmd.asm. When there was an error reading stdin, gsh went into an infinite loop of beeping and requesting more input. Changed getchar (in stdio.asm) and GetCmdLine (in edit.asm) to report the error and terminate. Code in cmd.asm set and reset handler for signal SIGSTOP (17). This makes no sense, since there cannot be a handler for SIGSTOP. This was changed to set and reset signal SIGTSTP (18) since that handler is used by gsh. The error message "specify a command before redirecting" was never caught by the invoke() subroutine because the next higher routine, command(), checked for argv==0 before calling invoke(). The error message was moved into command().
1998-10-26 17:04:51 +00:00
Oct 10 98 [dmt] Found race condition: when forked process completes
quickly, the parent process may not ever receive its completion
signal. Fix: ensure process exists by calling kill(pid,0)
and checking status before calling pwait (cmd.asm).
Change calls to set and reset handler for signal 17 (SIGSTOP)
to do it for signal 18 (SIGTSTP) (17 can't be caught; 18 is).
Oct 7 98 [dmt] Check for directory stack full in pushd, and report
new error message: 'pushd: Directory stack full'. (Previously,
50 pushds would cause a crash.)
Check for parameter in pushd "+n" <=0, and report a new error
message: 'pushd: Invalid number'. (Previously, tried to chdir
to the parameter.)
Oct 6 98 [dmt] Before calling pwait (to wait for child process) in
cmd.asm, enable the child status signal handler; change it
back to its previous state after the pwait call. This partially
fixes the problem of the shell waiting forever when a shell
exec file sources another exec file that contains a command
that causes a fork.
command() checked for argv==0 before calling invoke(), but
invoke() also checks. Move invoke()'s error message ("specify
a command before redirecting.") into command().
Sep 27 98 [dmt] Add quotes around null parameters on the command line
so they are parsed by the target command (PR#84)
Sep 25 98 [dmt] If a command appends to stdout (echo test >>&/tmp/err),
then stdin gets closed. This was due to errappend being
defined as pipefds+2 rather than pipefds+4 in cmd.asm.
Sep 23 98 [dmt] If there is an error reading stdin, gsh would go into
an infinite loop of beeping and requesting more input. Changed
getchar (in stdio.asm) and GetCmdLine (in edit.asm) to report
the error and terminate.
Sep 9 98 [dmt] Output piped to an unfound command caused gsh to
terminate. This was due to an interface change to getpgrp(2):
it now returns the process group of the caller. To get the
process group number of the parameter pid, the call has to
be made to _getpgrp(2). This change was made in invoke.asm to
fix the bug. Additional updates were made in jobs.asm.
Sep 7 98 [dmt] Changes to this point checked-in to master archive.
Changes for gsh version 2.0d5: Add quotes around null parameters from the command line so they will be parsed properly (resolves PR#84). Output piped to an unfound command caused gsh to terminate, due to an interface change to the GNO 2.0.6 version of getpgrp(2): it now returns the process group of the caller. To get the process group number for the pid passed as a parameter pid, the call has to be made to _getpgrp(2). In addition to fixing invoke.asm, updates were also made in jobs.asm. When directory stack is full, pushd, reports a new error message: 'pushd: Directory stack full'. (Previously, 50 pushds would cause a crash.) When parameter passed to "pushd +n" is <= 0, report a new error message: 'pushd: Invalid number'. (Previously, tried to chdir to the parameter.) When a command appends to stderr (e.g., echo test >>&/tmp/err), stdin was closed, due to errappend being defined as pipefds+2 rather than pipefds+4 in cmd.asm. When there was an error reading stdin, gsh went into an infinite loop of beeping and requesting more input. Changed getchar (in stdio.asm) and GetCmdLine (in edit.asm) to report the error and terminate. Code in cmd.asm set and reset handler for signal SIGSTOP (17). This makes no sense, since there cannot be a handler for SIGSTOP. This was changed to set and reset signal SIGTSTP (18) since that handler is used by gsh. The error message "specify a command before redirecting" was never caught by the invoke() subroutine because the next higher routine, command(), checked for argv==0 before calling invoke(). The error message was moved into command().
1998-10-26 17:04:51 +00:00
Released as version 2.0d4
Sep 7 98 [dmt] In "gettoken" (cmd.asm), decrement buf (pointer to
command line) when EOL is reached; otherwise if the character
following the command in the buffer is non-zero, the garbage
after the real command will be interpreted as another command.
Test case: "> /tmp/list" would cause "not found" error message.
Sep 6 98 [dmt] Added startup protocol as requested by Devin Reed
(PR#78) and Steve Reeves (PR#85, PR#86):
For login shells (command line starts with '-'),
If $PATH doesn't start with ':' or contain a space,
change all ":" to " ".
source /etc/glogin
source $HOME/glogin
($HOME/gshrc is sourced afterward for both login and non-login).
In rehash built-in command, don't the print number of hashed
until all initialization is completed.
Restored commented-out PushVariablesGS at start of "shell" in
shell.asm to keep subshells from changing parent's environment.
Aug 4 98 [dmt] Fixed defects in wordmatch (edit.asm) related to
recognizing commands versus filenames during tab and ctrl-D
filename completion. Suppose there is a file "filename" in the
current directory and you enter one of the following:
command >& filen
command >filen
and press tab. Instead of getting filename completion, you
would get a beep. In the first case, gsh thought the "&"
was putting the command in the background and filen was the
beginning of a command name rather than a filename. In the
second, gsh included the ">" in the filename match pattern.
Aug 3 98 [dmt] Entabbed all the asm files (saved >36,000 bytes).
Aug 3 98 [dmt] Changes to this point checked-in to master archive.
Changes for gsh version 2.0d5: Add quotes around null parameters from the command line so they will be parsed properly (resolves PR#84). Output piped to an unfound command caused gsh to terminate, due to an interface change to the GNO 2.0.6 version of getpgrp(2): it now returns the process group of the caller. To get the process group number for the pid passed as a parameter pid, the call has to be made to _getpgrp(2). In addition to fixing invoke.asm, updates were also made in jobs.asm. When directory stack is full, pushd, reports a new error message: 'pushd: Directory stack full'. (Previously, 50 pushds would cause a crash.) When parameter passed to "pushd +n" is <= 0, report a new error message: 'pushd: Invalid number'. (Previously, tried to chdir to the parameter.) When a command appends to stderr (e.g., echo test >>&/tmp/err), stdin was closed, due to errappend being defined as pipefds+2 rather than pipefds+4 in cmd.asm. When there was an error reading stdin, gsh went into an infinite loop of beeping and requesting more input. Changed getchar (in stdio.asm) and GetCmdLine (in edit.asm) to report the error and terminate. Code in cmd.asm set and reset handler for signal SIGSTOP (17). This makes no sense, since there cannot be a handler for SIGSTOP. This was changed to set and reset signal SIGTSTP (18) since that handler is used by gsh. The error message "specify a command before redirecting" was never caught by the invoke() subroutine because the next higher routine, command(), checked for argv==0 before calling invoke(). The error message was moved into command().
1998-10-26 17:04:51 +00:00
Released as version 2.0d3
Aug 2 98 [dmt] Remove alloc256/free256 and associated data. Replace
with fixed 64-byte buffer for command filename (hash.asm)
and allocation of 261-byte buffer via ~NEW for shell
variable name (shellvar.asm).
Aug 1 98 [dmt] Updated and expanded mmdebug.asm routines that perform
error checking on memory management calls. Added macros ~NEW
and ~DISPOSE that invoke either the real or debug routines.
Fixed call to read $TERM variable's length (PR#81).
Replace call to allocate256 in AppendHome (shell.asm) with
code that allocates space for $HOME plus the string parameter.
Jul 28 98 [dmt] In expandvars (expand.asm), use echoFlag=0 (not 1)
for ReadLine. The characters are echoed as they are typed
and do not need to be reprinted on stdout.
Jul 27 98 [dmt] Added error checking to the various flavors of prefix:
- Verify 2nd parameter is a valid directory before setting.
- Verify 1st parameter < 32 before displaying or setting.
Jul 26 98 [dmt] Removed last of old shell calls and calls to and code for
p-string routines (p2cstr, c2pstr, c2pstr2, putp, errputp).
Removed old shell macros and "str" from gsh.mac. In removing
putp calls, found instances in pwd & prefix commands and prompt
handler where current directory name was assumed to be < 256
characters; recoded to use new routine getpfxstr.
Jul 21 98 [dmt] Changed invoke.asm to use RedirectGS instead of redirect.
Changed popd (in dir.asm) to get length of prefix 0 before
allocating its string, rather than assuming path is <= 256
characters. This allows directory stack to use very long names.
Jul 20 98 [dmt] Changed expand.asm to use InitWildcardGS and
NextWildcardGS instead of their obsolete counterparts.
Jul 20 98 [dmt] Changes up to this point checked-in to master archive.
Changes for gsh version 2.0d5: Add quotes around null parameters from the command line so they will be parsed properly (resolves PR#84). Output piped to an unfound command caused gsh to terminate, due to an interface change to the GNO 2.0.6 version of getpgrp(2): it now returns the process group of the caller. To get the process group number for the pid passed as a parameter pid, the call has to be made to _getpgrp(2). In addition to fixing invoke.asm, updates were also made in jobs.asm. When directory stack is full, pushd, reports a new error message: 'pushd: Directory stack full'. (Previously, 50 pushds would cause a crash.) When parameter passed to "pushd +n" is <= 0, report a new error message: 'pushd: Invalid number'. (Previously, tried to chdir to the parameter.) When a command appends to stderr (e.g., echo test >>&/tmp/err), stdin was closed, due to errappend being defined as pipefds+2 rather than pipefds+4 in cmd.asm. When there was an error reading stdin, gsh went into an infinite loop of beeping and requesting more input. Changed getchar (in stdio.asm) and GetCmdLine (in edit.asm) to report the error and terminate. Code in cmd.asm set and reset handler for signal SIGSTOP (17). This makes no sense, since there cannot be a handler for SIGSTOP. This was changed to set and reset signal SIGTSTP (18) since that handler is used by gsh. The error message "specify a command before redirecting" was never caught by the invoke() subroutine because the next higher routine, command(), checked for argv==0 before calling invoke(). The error message was moved into command().
1998-10-26 17:04:51 +00:00
Released as version 2.0d3
Jul 19 98 [dmt] Changed edit.asm to use ReadIndexedGS, InitWildcardGS,
NextWildcardGS, instead of their obsolete counterparts.
Jul 18 98 [dmt] Changed Set_Variable, Export, UnsetVariable in cmd.asm,
shellvar.asm, jobs.asm, and term.asm to use new shell interface
(SetGS, ExportGS, UnsetVariableGS).
In InitTerm (term.asm), do not set TERM to gnocon if it is
already set.
Jul 17 98 [dmt] Changed final Read_Variable call (in edit.asm) to use
getenv instead. Changed ReadVariableGS calls in hash.asm
and builtin.asm to also use getenv.
Jul 16 98 [dmt] Changed Read_Variable calls in history.asm and prompt.asm
to use getenv instead.
Jul 15 98 [dmt] Changed getenv (shellutil.asm) to use ReadVariableGS
instead of Read_Variable to get value. getenv's input parameter
is now a pointer to a GS/OS string (not a C-string), and it
returns a pointer to a GS/OS result buffer with a terminating
null byte added. This interface change affected calls to
getenv in orca.asm and term.asm.
Jul 14 98 [dmt] Changed expandvars (expand.asm) to use ReadVariableGS
to get the value of an environment variable, allowing values
over 256 characters in length.
Jul 13 98 [dmt] Rewrote shellvar.asm to use newer shell calls to access
environment variables, so that they can be > 256 characters.
Combined set and setenv into the same routine, with different
entry points.
Jul 12 98 [dmt] In rehash command (hash.asm), read the PATH environment
variable with ReadVariableGS instead of Read_Variable, allowing
detection of true length and total length > 256 (PR # 9).
Jul 9 98 [dmt] Removed the df command (from builtin.asm).
Defined macro incad to increment a 4-byte address, checking
for overflow; replaced instances of "inc ptr" with "incad ptr".
Jul 8 98 [dmt] Changed column offset table to use a 1-word rather
than 1-byte entry. This resolves PR#14 (hash wouldn't
print beyond first 256 filenames).
Jul 7 98 [dmt] Fixed defect in unalias (alias.asm) where the double
quote portion of the scanner would look for a terminating
single quote. This resolves PR#69.
Jul 5 98 [dmt] Changed default order for copying files in $PATH dirs
into executable list, so earlier paths files are found first.
Added environment variable flag $OLDPATHMODE to make gsh
behave in the old (backwards order) way when necessary.
Discard duplicate filenames when hashing.
Fix PR#73: directory in $PATH with escaped space (\ ) is
not searched. Needed to remove the "\" before sending
pathname to ExpandPathGS.
Jun 29 98 [dmt] Changes up to this point checked-in to master archive.
Changes for gsh version 2.0d5: Add quotes around null parameters from the command line so they will be parsed properly (resolves PR#84). Output piped to an unfound command caused gsh to terminate, due to an interface change to the GNO 2.0.6 version of getpgrp(2): it now returns the process group of the caller. To get the process group number for the pid passed as a parameter pid, the call has to be made to _getpgrp(2). In addition to fixing invoke.asm, updates were also made in jobs.asm. When directory stack is full, pushd, reports a new error message: 'pushd: Directory stack full'. (Previously, 50 pushds would cause a crash.) When parameter passed to "pushd +n" is <= 0, report a new error message: 'pushd: Invalid number'. (Previously, tried to chdir to the parameter.) When a command appends to stderr (e.g., echo test >>&/tmp/err), stdin was closed, due to errappend being defined as pipefds+2 rather than pipefds+4 in cmd.asm. When there was an error reading stdin, gsh went into an infinite loop of beeping and requesting more input. Changed getchar (in stdio.asm) and GetCmdLine (in edit.asm) to report the error and terminate. Code in cmd.asm set and reset handler for signal SIGSTOP (17). This makes no sense, since there cannot be a handler for SIGSTOP. This was changed to set and reset signal SIGTSTP (18) since that handler is used by gsh. The error message "specify a command before redirecting" was never caught by the invoke() subroutine because the next higher routine, command(), checked for argv==0 before calling invoke(). The error message was moved into command().
1998-10-26 17:04:51 +00:00
Released as version 2.0d2
Jun 28 98 [dmt] Added InitVar routine to shellvar.asm to read values
of all environment variables tracked in vardata.
Jun 25 98 [dmt] Added 2.0 versions of shell calls to gsh.mac (e.g.
ErrorGS, ReadVariableGS). Replaced old calls with new ones
for the following: ERROR to ErrorGS in builtin.asm, cmd.asm
dir.asm, shellvar.asm; Push[Pop]Variables to Push[Pop]VariabesGS
in invoke.asm, shellvar.asm, shell.asm; ReadVariable to
ReadVariableGS in builtin.asm and dir.asm.
Jun 23 98 [dmt] Made clear built-in a non-forked command.
Jun 21 98 [dmt] Added loop to execute(), in cmd.asm, to extract a single
command from the input line before sending it to command(). It
removes leading blanks and tabs and terminates the string at
the first ";" or "#". After command() has finished, execute()
loops again if the previous command was terminated with a ";".
This change fixed both problems in bug report #12:
a) All commands separated by ";" were evaluated before any
were executed, so the following wouldn't work:
set t_num=1 ; echo "Test number $t_num"
b) Odd things randomly happened when tab was the first
character of multiple consecutive lines.
Jun 20 98 [dmt] Changed pointer arithmetic from dec or inc to adc or sbc
to allow for boundary condition in shell.asm.
In ShellExec (cmd.asm), save status from call to execute and
pass back to caller in Accumulator.
Modify table of builtins so that source is unforked; this
fixes bug reports #7 and #8: prefix does not work from a
sourced file.
Jun 18 98 [dmt] In cmd.asm, modified system() to check for null pointer,
since that is documented in the ORCA/C manual as legal.
Jun 15 98 [dmt] Fixed bug report #3: when wildcards were expanded, if
nothing was found gsh printed "No match." and terminated, even
if there were more arguments to parse. Now gsh prints a message
"No match: <pattern> ignored" to stderr for each <pattern> that
does not match any filename. These changes were in expand.asm.
Changed mutual exclusion in cmd.asm and shellvar.asm to use
lock/unlock/key macros. That should be all of 'em.
Jun 14 98 [dmt] Fixed bug report #47: when ~ is parsed and next character
is a delimiter ("/" or ":") and first character of $HOME does
not match that delimiter, replace the delimiters in $HOME to
match the user's value. Changed three "ora addr" to "ora addr+2"
(alias.asm: ora ptr; edit.asm and history.asm: ora cdcap).
Changed mutual exclusion in expand.asm to use lock/unlock macros.
Jun 13 98 [dmt] Wrote script to test built-in commands; found many that
returned status=227. Updated exit, setdebug, ps, hash, commands,
history, dirs, pushd, popd, jobs, fg, bg, and stop to return
status of 0 (modified "return" to add "2:#0").
Jun 12 98 [dmt] Squeezed about 80 bytes out of orca.o (edit built-in),
mainly by removing "invalid path name" error msg, since I
couldn't force ExpandPath to report the error and the editor
handles it fine. Also tightened "whileloop" by using Y-reg
to index off of two pointers. Added lots of comments.
Jun 10 98 [dmt] The boolean shell environment variables (echo, pushdsilent,
etc.) would not work if they were set using UPPER CASE names.
Added routine cmpdcstr in shellutil.asm to downshift characters
while comparing two c strings, then called it from updatevars
in shellvar.asm to compare env variable names.
Jun 9 98 [dmt] Modified echo command (in builtin.asm) so it doesn't append
a blank to the end of everything it prints. Added comments to code.
Jun 8 98 [dmt] Added breakpoint option to setdebug (in builtin.asm) to
allow turning on conditional brk instructions for debugging.
Made "check4debug" a global word that reflects the current debug
state, and added "breakpoint" macro (in gsh.mac) to generate code.
Changed "2.0.4" to "2.0.6" within gnostr (in shell.asm).
Jun 6 98 [dmt] All the macros were extracted, compared, and collated in
alphabetical order into the file gsh.mac. Six macros used by
other macros had to be moved to the end of the file.
Added direct-page/stack data segment (size 2K) to main.asm.
It is initialized to be filled with "?" characters, so that
it can be examined to see how much space is being used.
Jun 5 98 [dmt] Determined that the current sources have only two
differences from the gsh distributed with GNO/2.0.4:
In main.asm between (argloop and cmd3) the code
ph4 #1024
jsl ~NEW
formerly was
pea 1024
jsl ~NEW
In jobs.asm (after dokill) the error check after
kill (pid,signum)
was not present.
Jun 1 98 [dmt] Changed to execvp to _execve in invoke.asm. gsh works!
24 Apr 98 [gdr] Fitted gsh sources into into GNO builds. While gsh
assembles and links (abeit using the v2.0.4 termcap library),
it does not currently run -- it just crashes. The changes
that were made includes:
- 'keep' lines were eliminated
- the 'mcopy' now takes the macro from the /obj/gno/bin/gsh
directory. This is in anticipation of having the macro
files generated from a single source file; there is a large
amount of duplication. For the moment, the makefile merely
copies the old macro files from the "M" directory to the
/obj/gno/bin/gsh directory.
- start each file with a dummy routine so that the source
code winds up in the *.o rather than the *.root file.
- added the 'setcom 60' directive; there were many source
lines that were otherwise getting truncated.
18 Nov 97 - [gdr] initial checkin into v2.0.6 repository. No changes
were made to the sources.
GSH 1.1 UPDATES
^^^^^^^^^^^^^^^
(unknown) - Removed two references to $E0C000 in shell.asm (signal
handlers). Bad Timmy!
2/25/92 d01 - fixed a problem with the command-line aborting after certain
built-ins are run.
4/03/92 d02 - .ttya and .ttyb are displayed as 'ta' and 'tb' respectively in
'ps'.
- "USER" field has been renamed to "MMID" in 'ps'.
d03 - removed all the extra newlines around 'There are stopped jobs'
message.
- 'exit' in a shell script aborts the script, instead of quitting
gsh itself.
- when getting a 'There are stopped jobs' message, a second
attempt to exit the shell will result in all jobs being killed
and the shell will exit. No commands may appear between the
two attempts to exit. This is basically just like csh behaviour.
d04 - motd pathname has been changed to '31:etc:motd' where 31 is the
location of GNO, not the user directory. eventually motd will
be removed from gsh and will be handled by login or something
similar.
4/07/92 d05 - ^D and TAB expansion now properly works on */ boot prefix.
4/13/92 d06 - started work on new string vector library.
- started new builtin - 'hash' to display all hashed files.
Extremely preliminary.
4/14/92 d07 - 'hash' now uses string vectors to build the hash list for
displaying
- fixed a problem if no files were hashed.
- sv_alloc now makes sure there is an extra null at the end
of the allocated string vector.
4/20/92 d08 - 'which' puts the filename after the path for commands in
the current directory.
d09 - wrote a string vector function for printing the string
vectors in columns like 'ls'. 'hash' now calls this.
4/21/92 d10 - wrote routine for sorting string vectors...'hash' now sorts the
list...
4/23/92 d11 - full directory stack support!! pushd, popd, and dirs!!
d12 - 'ps' displays 'nu' for the .null driver under TT field.
4/25/92 d13 - Added '-l' option to 'kill'.
6/22/92 d14 - Began writing custom stdio for the shell using GS/OS output.
6/23/92 - minor optimization to alias hashing.
- finished stdout and stderr for gsh.
d15 - history file is no longer deleted on gsh start-up
- fixed '~' printer used in 'dirs'. /usr2/ was displayed as
~2 if $home was /usr. Looked real dumb :) and was incorrect.
- optimizations to job control
d16 - echo flushes the stdio when finished.
6/24/92 - fixed bug in system() call vector..make should work better
now :)
- added a newline after 'pwd'.
- wrote 'edit' built-in.
6/26/92 d17 - began work on stdin for gsh. Uses GS/OS, ioctl(), etc...
- began rewriting editor. Now uses key translation tables and
command jump tables.
- editor now accepts multiple character commands.
6/27/92 - further work on editor
- started work on termcap support in gsh. most command-line
editing uses termcap now.
6/28/92 - continued work on editor and termcap
- 'clear' and 'echo' builtins now use termcap.
- prompt now uses termcap.
- hacked up a quick 'tset' builtin.
- wrote keybinding function, termcap arrow keys now bound!
- beta test release sent out
6/29/92 d18 - if alias 'precmd' is defined, it is executed before drawing
each prompt.
- if $pushdsilent is set, then directory stack not displayed
after 'pushd' and 'popd'.
- termcap optimizations for history mechanism in editor.
- termcap optimizations for kill-line and kill-end-of-line.
- fixed bug in overwrite mode of editor...required too many
returns to end line -> rts's weren't being pulled off the
stack :)
6/30/92 - fixed a bug in the 'which' command when displaying files in cwd.
- the cursor is now left on when running applications.
- added '-c' option to gsh command-line
- wrote 'source' built-in
7/04/92 - fixed two bugs in prompt display code.
7/17/92 - fixed puts to not choke on NULL strings.
7/21/92 - Temporarily added Push/PopVariables to the code
- ospeed is now set so that padding can be done by termcap.
This fixed the dropped characters on my Xerox terminal when
doing screen clears.
- fixed a bug in 'tset'. Was doing a jsr instead of jsl. oops.
- set term can be in gshrc w/o manually doing a tset now.
- 'ps' now scans job list to find names of 'forked' processes.
- 'ps' nows displays tty numbers, since the ttyname is set
in 31/etc/ttys and not necessarily second-guessed by gsh.
7/25/92 - fixed cursor off problems.
8/26/92 d19 - larger number of builtins can be redirected or piped.
- Open-Apple is now mapped to meta (ESC).
- The editor tells gnocon to translate arrows into VT100 codes.
- fixed editor bug clearing entire line.
- wrote 'bindkey' built-in.
8/27/92 d20 - faster built-in searching.
- wrote 'setenv' builtin.
8/28/92 - termcap optimizations to word completion
- word completion now matches variables if word starts with '$'.
8/29/92 - only executuables are expanded if the word is a command. All
files are expanded for arguments.
8/30/92 - words to complete no longer need to be separated with spaces,
';','|', and '&' are now also recognized.
9/01/92 - 'cd' no longer reports bad pathname syntax if $home not set.
- 'pid' parsing now does syntax checking :)
- kill won't allow killing process 0
- changed 'jobs' invocation from method 0 to method 1.
- word completion will not occur if the word contains an '=',
single quote or double quote.
9/03/92 - fixed memory trashing problem in 'source'
9/04/92 - 'ps' only displays processes with the users uid. Be sure to
use login, or you'll be the kernel's uid and get to see all
of the kernel's processes as your own.
9/10/92 - forgot to 'clc' when alias not found in 'alias foo'.
9/20/92 - fixed open-apple mapping
- changed keyboard mapping
- tab expands directories as the command
- set problem with '-f' fixed
9/21/92 - fixed 'cd' with no arguments.
- fixed 'set foo' and 'setenv foo'.
- fixed bug again in 'cd'.
- 'set' and 'setenv' list exported variable names in upper case
- fixed a probelm in puts when passed a null pointer.
- fixed pointer bug in '~' compactor
- wrote 256 byte buffer pool
9/22/92 - fixed parsing bug when parsing two or more command-lines
simultaneously.
- wrote 1024 byte buffer pool.
- word completion now matches built-ins
- wordmatching ignores matches if the suffix is contained in
the $fignore variable.
10/31/92 d21 - fixed bug in piping mechanism.
11/04/92 - fixed hashing problems.
11/17/92 - new builtin 'commands' lists all built-in commands. Try aliasing
help to this for beginning users.
01/17/93 b01 - fixed prefix not printing correctly if zero length prefix.
- word completion will expand to proper case.
01/20/93 b02 - removed motd printing from gsh
02/08/93 - fixed job control setting of terminal when background job
completes.
02/09/93 - ^C & ^Z printing removed from the shell. The kernel will do
this now.
02/17/93 b03 - gshrc is now read as '@:gshrc'
03/02/93 - 'set' automatically detects changing $term and auto-peforms a
tset. manually typing 'tset' is no longer required though it is
still included.
- prompts can now contain \n,\r,\t,\b.
03/10/93 - updated automatic variable setting code. works faster now.
- optimized low-level string routines
03/25/93 - fixed NULL commands aborting entire command-lines.
04/04/93 - history commands can now be greater than 256 characters, though
when being read, they are clipped to 1024.
- the history file location has been moved to '@:history'
- if $ignoreeof is set, then EOF (^D) will not quit the shell.
- %U and %u will start and end underlining in prompts.
04/22/93 b04 - 'df' displays device numbers
- gsh now takes commands as command-line input. ie.,
'gsh echo hello, world' will start gsh then gsh will run echo.
- fixed a nasty shell script bug that basically rendered it
useless.
- fixed memory trashing in shell scripts.
- fixed memory trashing in histories.
04/26/94 b05 - which no longers displays the command-name first.