HardenedBSD/bin/sh
Martin Cracauer 7a8e920bb9 Do not exit on SIGINT in non-interactive shells, fixes PR 1206,
i.e. this makes emacs usable from system(3). Programs called from
shellscripts are now required to exit with proper signal status. That
means, they have to kill themself. Exiting with faked numerical exit
code is not sufficient.

Exit with proper signal status if script exits on signal.

Make the wait builtin interruptable, both with and without traps set.

Use volatile sig_atomic_t where (and only where) appropriate.

(Almost) fix printing of newlines on SIGINT.

Make traps setable from trap handlers. This is needed for shellscripts
that catch SIGINT for cleanup work but intend to exit on it, hance
have to kill themself from a trap handler. I.e. mkdep.

While I'm at it, make it -Wall clean. -Wall is not enabled in
Makefile, since vararg warnx() macro calls in usr.bin/printf/printf.c
are not -Wall-able.
PR:		1206
Obtained from:	Basic SIGINT fix from Bruce Evans
1998-08-24 10:20:37 +00:00
..
bltin
funcs
alias.c Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
alias.h
arith_lex.l Do not exit on SIGINT in non-interactive shells, fixes PR 1206, 1998-08-24 10:20:37 +00:00
arith.h
arith.y Do not exit on SIGINT in non-interactive shells, fixes PR 1206, 1998-08-24 10:20:37 +00:00
builtins.def
cd.c Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
cd.h
error.c Do not exit on SIGINT in non-interactive shells, fixes PR 1206, 1998-08-24 10:20:37 +00:00
error.h Do not exit on SIGINT in non-interactive shells, fixes PR 1206, 1998-08-24 10:20:37 +00:00
eval.c Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
eval.h
exec.c Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
exec.h
expand.c Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
expand.h
histedit.c Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
init.h
input.c Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
input.h
jobs.c Do not exit on SIGINT in non-interactive shells, fixes PR 1206, 1998-08-24 10:20:37 +00:00
jobs.h Do not exit on SIGINT in non-interactive shells, fixes PR 1206, 1998-08-24 10:20:37 +00:00
machdep.h
mail.c Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
mail.h
main.c Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
main.h
Makefile Added a `build-tools' target for internal tools. 1998-07-07 01:06:58 +00:00
memalloc.c Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
memalloc.h
miscbltin.c Do not exit on SIGINT in non-interactive shells, fixes PR 1206, 1998-08-24 10:20:37 +00:00
mkbuiltins
mkinit.c Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
mknodes.c Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
mksyntax.c Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
mktokens
myhistedit.h
mystring.c Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
mystring.h
nodes.c.pat
nodetypes
options.c Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
options.h
output.c Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
output.h
parser.c Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
parser.h
redir.c Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
redir.h
sh.1 Document behaviour of "-" and "--" on the command line. 1998-07-30 04:47:56 +00:00
shell.h
show.c Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
show.h
TOUR
trap.c Do not exit on SIGINT in non-interactive shells, fixes PR 1206, 1998-08-24 10:20:37 +00:00
trap.h Do not exit on SIGINT in non-interactive shells, fixes PR 1206, 1998-08-24 10:20:37 +00:00
var.c Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
var.h