HardenedBSD/bin
Jilles Tjoelker 960da93430 Avoid leaving unnecessary waiting shells in many forms of sh -c COMMAND.
This change only affects strings passed to -c, when the -s
option is not used.

The approach is to check if there may be additional data
in the string after parsing each command. If there is none,
use the EV_EXIT flag so that a fork may be omitted in
specific cases.

If there are empty lines after the command, the check will
not see the end and forks will not be omitted. The same
thing seems to happen in bash.

Example:
  sh -c 'ps lT'
No longer shows a shell process waiting for ps to finish.

PR:		bin/113860
Reviewed by:	stefanf
Approved by:	ed (mentor)
2009-06-13 21:17:45 +00:00
..
cat cat(1) compiles fine at WARNS level 6. 2009-03-16 12:16:17 +00:00
chflags Fix chflags -h in various cases: do not use link target's flags as original. 2009-05-24 15:27:25 +00:00
chio
chmod
cp Preserve file flags on symlinks in cp -Rp. 2009-05-30 10:36:14 +00:00
csh
date
dd
df Make "human-readable" (-H/-h) output also "humanize" inode counts. 2009-06-07 09:06:21 +00:00
domainname
echo
ed
expr
getfacl
hostname
kenv
kill
ln
ls Add reference to strmode(3). 2009-04-13 15:29:14 +00:00
mkdir
mv
pax Before this fix, pax would stop the restore sequence for 2009-02-01 06:15:46 +00:00
pkill When finding processes, ignore ourself and our ancestors. It is almost 2009-05-17 04:34:14 +00:00
ps Fix elapsed (etime) field for swapped out processes in ps: 2009-05-24 15:32:34 +00:00
pwd
rcp
realpath
rm rm, find -delete: fix removing symlinks with uchg/uappnd set. 2009-05-30 10:42:19 +00:00
rmail
rmdir
setfacl
sh Avoid leaving unnecessary waiting shells in many forms of sh -c COMMAND. 2009-06-13 21:17:45 +00:00
sleep
stty
sync
test Fix various cases with 3 or 4 parameters in test(1) to be POSIX compliant. 2009-05-26 22:33:10 +00:00
uuidgen
Makefile
Makefile.inc