Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ucsfcgl.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!ucbvax!ucsfcgl!scooter From: scooter@ucsfcgl.UUCP (Scooter Morris%John Gardi) Newsgroups: net.bugs.2bsd Subject: Bug in select for ttys Message-ID: <412@ucsfcgl.UUCP> Date: Wed, 19-Dec-84 15:24:51 EST Article-I.D.: ucsfcgl.412 Posted: Wed Dec 19 15:24:51 1984 Date-Received: Sat, 22-Dec-84 02:19:02 EST Distribution: net Organization: UCSF Computer Graphics Lab Lines: 17 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.