K 10 svn:author V 6 dwhite K 8 svn:date V 27 2005-05-05T03:48:08.000000Z K 7 svn:log V 668 Commit a workaround to panics in ttwwakeup() during open and closes of the terminal sharing /dev/console. Peek at tty structs passing through ttymalloc() and pass them to ttyrel() if they'd get reaped due to the refcount dropping to 0. Also loosen up the refcount check in ttyrel() to account for refcounting problems caused by the incestuous relationship. I left the KASSERT alone in case people want to look into the underlying issue. Reaping dying tty structs helps keep stale data from growing in the knote lists, which eventually get tripped over, causing the panic. This change does not apply to -CURRENT due to differences in tty handling. MFC after: 3 days END