freebsd-nq/bin/sh
Steve Price f98e1b8071 With these changes sh(1)'s trap command should be POSIX-compliant,
while remaining (becoming :) compatible with other popular shells.
Specifically these changes include:

1) Implement 'trap -l' to get a list of valid signals names.  This
   is useful if you wanted to do something like reset all signal
   handlers to there defaults values, in which case something like
   this will do the trick.

	trap `trap -l`

2) Reformat the output of 'trap' so it can be saved and later eval'd
   to restore the saved settings.

3) Allow the use of signal names as well as signal numbers.

4) Fix trap handling of SIGCHLD so that commands like the following
   (albeit, contrived) won't cause sh(1) to recurse ad infinitum.

	trap uname 0 20

5) Make variables static that are used only in trap.c.

6) Minor 'style(9) police' mods.
1996-12-24 23:59:53 +00:00
..
bltin Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
funcs Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is a 1996-09-01 10:22:36 +00:00
alias.c Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
alias.h Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is a 1996-09-01 10:22:36 +00:00
arith_lex.l Remove extra #undef. 1996-12-21 14:57:38 +00:00
arith.h Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is a 1996-09-01 10:22:36 +00:00
arith.y Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
builtins.def re-activate the printf builtin now that src/usr.bin/printf.c has been 1996-10-01 04:59:13 +00:00
cd.c Oops, it needs little more caulk to get it right. 1996-12-23 22:29:03 +00:00
cd.h Make sh(1) a little braver in the face of adversity. sh(1) 1996-12-21 22:09:40 +00:00
error.c Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
error.h Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
eval.c Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
eval.h Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
exec.c Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
exec.h Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
expand.c This doesn't change any behavior, but may be a slight 1996-12-21 15:16:32 +00:00
expand.h Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is a 1996-09-01 10:22:36 +00:00
histedit.c Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
init.h Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is a 1996-09-01 10:22:36 +00:00
input.c Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
input.h Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
jobs.c Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
jobs.h Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is a 1996-09-01 10:22:36 +00:00
machdep.h Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is a 1996-09-01 10:22:36 +00:00
mail.c Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
mail.h Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is a 1996-09-01 10:22:36 +00:00
main.c Make sh(1) a little braver in the face of adversity. sh(1) 1996-12-21 22:09:40 +00:00
main.h Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is a 1996-09-01 10:22:36 +00:00
Makefile Build intermediate object files for mkinit, mknodes and mksyntax 1996-10-25 14:49:24 +00:00
memalloc.c Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
memalloc.h Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is a 1996-09-01 10:22:36 +00:00
miscbltin.c Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
mkbuiltins Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is a 1996-09-01 10:22:36 +00:00
mkinit.c Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
mknodes.c Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
mksyntax.c Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
mktokens Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is a 1996-09-01 10:22:36 +00:00
myhistedit.h Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
mystring.c Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
mystring.h Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is a 1996-09-01 10:22:36 +00:00
nodes.c.pat Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is a 1996-09-01 10:22:36 +00:00
nodetypes Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is a 1996-09-01 10:22:36 +00:00
options.c Fix a problem caused by finger failure on my part. The builtin 1996-12-21 13:21:57 +00:00
options.h Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
output.c Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
output.h Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
parser.c Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
parser.h Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
redir.c Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
redir.h Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
sh.1 Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
shell.h Make sh(1) a little braver in the face of adversity. sh(1) 1996-12-21 22:09:40 +00:00
show.c Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
show.h Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
TOUR Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is a 1996-09-01 10:22:36 +00:00
trap.c With these changes sh(1)'s trap command should be POSIX-compliant, 1996-12-24 23:59:53 +00:00
trap.h Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
var.c Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00
var.h Merge in NetBSD mods and -Wall cleaning. 1996-12-14 06:20:03 +00:00