5db312a1c0
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. |
||
---|---|---|
.. | ||
include | ||
libsys | ||
boot.s | ||
build-pkg.lua | ||
build-tools.lua | ||
descr |