e6ab6d48dc
point to a tty. Unfortunately the shell assumed that it could do all process group handling ioctls to fd=2, but this is not correct. Jobs that redirected fd=2 would be unable to perform the ioctls and silently fail since the error reporting channel is fd=2... Instead open /dev/tty set it to close on exec, and use that instead (like all other shells do). We don't handle the case where the OS does not provide FD_CLOEXEC or FIOCLEX, because I am lazy. While I am there: - Simplify the code by defining functions for tc{g,s}pgrp when OLD_TTY_DRIVER is defined. - make sure that 'sh &' works by stopping itself. Don't kill the shell's process group, kill the shell itself. |
||
---|---|---|
.. | ||
cat | ||
chio | ||
chmod | ||
cp | ||
csh | ||
date | ||
dd | ||
df | ||
domainname | ||
echo | ||
ed | ||
expr | ||
hostname | ||
kill | ||
ksh | ||
ln | ||
ls | ||
mkdir | ||
mt | ||
mv | ||
pax | ||
ps | ||
pwd | ||
rcmd | ||
rcp | ||
rm | ||
rmdir | ||
sh | ||
sleep | ||
stty | ||
sync | ||
test | ||
Makefile | ||
Makefile.inc |