ack/plat/pdpv7/libsys
George Koehler 5db312a1c0 Prevent crash in isatty()
The existing code allocated 2 bytes (char*), but gtty() needs 6 bytes
(struct sgttyb), so isatty() smashed the stack and corrupted its
return address, probably causing SIGBUS or SIGSEGV.

Fix by switching to TIOCGETD, which needs 2 bytes.  TIOCGETD isn't in
the manual for tty(4), but does appear in
https://minnie.tuhs.org//cgi-bin/utree.pl?file=V7/usr/sys/dev/tty.c

This fixes hilo_c.pdpv7 and hilo_mod.pdpv7 in simh-pdp11.
2018-06-15 00:48:29 -04:00
..
_alarm.s
_close.s
_creat.s
_dup.s
_execl.s
_exit.s Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
_fork.s
_fstat.s Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
_ftime.s
_getpid.s Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
_gtty.c
_ioctl.s
_kill.s
_link.s Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
_lseek.s
_open.s Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
_pause.s
_pipe.s
_read.s
_sbrk.s
_unlink.s Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
_wait.s
_write.s Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
access.s
acct.s
alarm.s Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
build.lua Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
chdir.s
chmod.s
chown.s
chroot.s
cleanup.c
close.s Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
creat.s
dup.s Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
errno.s
execl.s
execle.s
execv.s
execve.s
exit.c
fetchi.s
fork.s
fperr.s
fstat.s
ftime.s Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
getgid.s
getgrp.s
getpid.s
getppid.s
getuid.s
gldav.s Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
gtty.c
ioctl.s
isatty.c Prevent crash in isatty() 2018-06-15 00:48:29 -04:00
kill.s
killbkg.s
killpg.s
link.s
lock.s
login.s
lseek.s
lstat.s
mknod.s
mount.s
mpxcall.s
nice.s Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
nostk.s Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
open.s
pause.s
phys.s Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
pipe.s
profil.s Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
ptrace.s
qfstat.s
qstat.s
quota.s Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
read.s
readlink.s
reboot.s
renice.s
rtp.s
sbrk.s
setgid.s
setgrp.s
setuid.s
signal.s Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
stat.s
stime.s
stty.c
submit.s Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
symlink.s Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
sync.s
sys.h Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
time.s Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
times.s
ucall.s Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
umask.s
umount.s
unlink.s
utime.s
vfork.s
vhangup.s
wait.s
write.s