Bug in select for ttys
Scooter Morris%John Gardi
scooter at ucsfcgl.UUCP
Thu Dec 20 06:24:51 AEST 1984
Subject: select system call does not work for ttys when DH_SOFTCAR is defined
Index: sys/dev/tty.c 2.9bsd
Description:
When a system has a DH driver and DH_SOFTCAR is defined, the select
system call fails for ttys which have the softcar bit set.
Repeat-By:
Try a select on a tty with a softcar bit set. The results will
be sporadic at best, but will never work correctly.
Fix:
The problem is in the ttselect() routine when it assigns the
pointer to the tty structure. It uses the minor(dev) macro
which strips the lower 8 bits off of the device number. If the
tty has the soft carrier bit (128) set, however, the pointer
returned is off in never-never-land. I just included dh.h in
tty.c and if DH_SOFTCAR is set replaced minor(dev) with
minor(dev)&0177.
More information about the Comp.bugs.2bsd
mailing list