freebsd-nq/bin
Jilles Tjoelker e1ef314121 Fix some cases where file descriptors from redirections leak to programs.
- Redirecting fds that were not open before kept two copies of the
  redirected file.
    sh -c '{ :; } 7>/dev/null; fstat -p $$; true'
    (both fd 7 and 10 remained open)
- File descriptors used to restore things after redirection were not
  set close-on-exec, instead they were explicitly closed before executing
  a program normally and before executing a shell procedure. The latter
  must remain but the former is replaced by close-on-exec.
    sh -c 'exec 7</; { exec fstat -p $$; } 7>/dev/null; true'
    (fd 10 remained open)

The examples above are simpler than the testsuite because I do not want to
use fstat or procstat in the testsuite.
2009-11-29 22:33:59 +00:00
..
cat Removed redundant WARNS setting. 2009-10-15 18:17:29 +00:00
chflags Staticify internal routines. 2009-06-23 23:30:56 +00:00
chio
chmod - Don't include both <sys/types.h> and <sys/param.h> 2009-09-02 05:26:59 +00:00
cp Add NFSv4 ACL support to cp(1) and fix a few memory leaks. 2009-09-02 08:08:57 +00:00
csh Check error of dlfunc(3). 2009-10-17 15:53:15 +00:00
date
dd
df Staticify internal routines. 2009-06-23 23:30:56 +00:00
domainname
echo
ed
expr
getfacl Use our canonical .Dd format. 2009-11-02 12:35:38 +00:00
hostname Staticify internal routines. 2009-06-23 23:30:56 +00:00
kenv
kill
ln Allow creating hard links to symlinks using ln(1). 2009-07-19 17:35:23 +00:00
ls ls: Make -p not inhibit following symlinks. 2009-10-13 21:51:50 +00:00
mkdir
mv Add NFSv4 ACL support to mv(1). 2009-09-04 21:49:37 +00:00
pax
pkill
ps Fix small resource leak (memory). 2009-11-17 07:29:35 +00:00
pwait Add pwait utility, which waits for any process to terminate. 2009-11-17 22:47:20 +00:00
pwd
rcp
realpath
rm
rmail
rmdir
setfacl Add NFSv4 support to setfacl(1). 2009-09-07 16:19:32 +00:00
sh Fix some cases where file descriptors from redirections leak to programs. 2009-11-29 22:33:59 +00:00
sleep
stty
sync
test
uuidgen Removed redundant WARNS setting. 2009-10-15 18:17:29 +00:00
Makefile Add pwait utility, which waits for any process to terminate. 2009-11-17 22:47:20 +00:00
Makefile.inc