Fix an exit-race with ^T. If a process is exiting it may be detached from
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 4 May 2004 23:22:43 +0000 (23:22 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 4 May 2004 23:22:43 +0000 (23:22 +0000)
commiteb65c4627740618e4601b2d44c313bec0b28ccea
tree59d59d211365aa4d9aac15f521aeecbfcea98bfe
parentef4f0aa7fa819dc8264ef6724b1ac2b53521fe37
Fix an exit-race with ^T.  If a process is exiting it may be detached from
its thread.  p_wmesg is actually p_thread->td_wmesg, so do not dereference
p_wmesg unless a thread is still attached to the process!

Reported-by: "Jonas Trollvik" <Jonas.Trollvik@telia.com>
sys/kern/tty.c