NetBSD/bin
martin c83168f3dc Pull up following revision(s) (requested by kre in ticket #684):
bin/sh/jobs.c: revision 1.107
	bin/sh/main.c: revision 1.83
	bin/sh/main.c: revision 1.84
	bin/sh/main.c: revision 1.85

If we are invoked with SIGCHLD ignored, we fail badly, as we assume
that we can always wait(2) for our children, and an ignored SIGCHLD
prevents that.   Recent versions of bash can be convinced (due to a
bug most likely) to invoke us that way.   Always return SIGCHLD to
SIG_DFL during init - we already prevent scripts from fiddling it.

All ash derived shells apparently have this problem (observed by
Martijn Dekker, and notified on the bash-bug list).  Actual issue
diagnosed by Harald van Dijk (same list).

Actually, the issue with bash (in previous) is more likely that the
SIGCHLD is blocked rather than ignored.   We want neither.   Make sure
SIGCHLD is unblocked as well as SIG_DFL.

XXX pullup -9

bin/sh: Fixes -Werror=shadow causing build breaks.
Conflicting variable name, sigset_t sigs has been renamed to sigset_t mask

Reviewed by: kamil@

Avoid a core dump if a child process that is not one of our
children happens to exit while we are waiting for another child
to exit.

This can happen with code like
	sh -c '
		sleep 5 &
		exec sh -c "sleep 10 & wait !$"
	      '

when the inner "sh" is waiting for the 10 second sleep to be
done, the 5 second sleep started earlier terminates.   It is
a child of our process, as the inner shell is the same process
as the outer one, but not a known child (the inner shell has no
idea what the outer one did before it started).

This was observed in the wild by Martijn Dekker (where the outer
shell was bash but that's irrelevant).

XXX pullup -9
2020-02-10 18:54:14 +00:00
..
cat
chio
chmod
cp
csh compare pointers with NULL not '\0'. 2019-02-01 08:29:03 +00:00
date
dd When buffers are at least page sized, explicitely request page alignment. 2019-03-23 09:33:16 +00:00
df
domainname
echo
ed Unifdef compatibility for broken realloc. 2019-01-04 19:13:58 +00:00
expr
hostname
kill
ksh - use -Wno-error=implicit-fallthrough with GCC7. 2019-02-04 04:05:15 +00:00
ln
ls
mkdir
mt
mv
pax Pull up following revision(s) (requested by nakayama in ticket #421): 2019-11-13 12:56:22 +00:00
ps Pull up following revision(s) (requested by kamil in ticket #24): 2019-08-07 08:25:32 +00:00
pwd
rcmd
rcp
rm
rmdir
sh Pull up following revision(s) (requested by kre in ticket #684): 2020-02-10 18:54:14 +00:00
sleep Deal with overflow when the sleep duration given is a simple 2019-03-10 15:18:45 +00:00
stty
sync
test
Makefile
Makefile.inc