Many fixes to ash (/bin/sh)
authorJim Wilson <wilson@moria.cygnus.com>
Fri, 4 Jun 1993 00:00:00 +0000 (00:00 +0000)
committerJim Wilson <wilson@moria.cygnus.com>
Fri, 4 Jun 1993 00:00:00 +0000 (00:00 +0000)
commitc20660cc1112abf1dcbc5cbedd1c5fcc484161d0
tree2fa2bd806957ff335da3628b82c34e6370fb8d6b
parent2704d8882582fc46774dbdd8f7896ef44a28f051
Many fixes to ash (/bin/sh)

I have been fixing /bin/sh (aka ash) bugs.  If you know of shell
bugs that aren't fixed by this patch, or have problems with this patch,
send me a bug report and I will try to fix it.

This patch fixes 7 bugs:
1) correct handling of \ within backquotes
2) don't require \n or ; before do in `for var do'
3) accept redir before (non-simple) command
4) don't expand regexps as case pattern if inside string
5) for a background command, don't redirect stdin to /dev/null if stdin has
   been previously redirected
6) set exitstatus for backquoted commands
7) correctly expand $n inside quotes

This patch should fix all problems with C-news.
It also fixes some problems with the SPEC benchmark suite, groff 1.07, etc.

I have test cases for each of these patches for anyone who is interested
in seeing them.

Jim Wilson
wilson@moria.cygnus.com

Date: Mon, 19 Apr 1993 07:06:52 GMT

AUTHOR: Jim Wilson (wilson@moria.cygnus.com)
386BSD-Patchkit: patch00168
usr/src/bin/sh/expand.c
usr/src/bin/sh/jobs.c
usr/src/bin/sh/parser.c
usr/src/bin/sh/redir.c
usr/src/bin/sh/redir.h