Fix a crash on access to TAP's owning thread. The owning thread can go away
commit6be00a6c237c502c8dfb52e570f12a0c0b195aff
authorMatthew Dillon <dillon@dragonflybsd.org>
Fri, 5 Sep 2008 17:03:15 +0000 (5 17:03 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Fri, 5 Sep 2008 17:03:15 +0000 (5 17:03 +0000)
treeb2d47d12540726fdd74e002b1805a7e0ee616e8b
parent638744c54a0eaf458805766357e033058972cb54
Fix a crash on access to TAP's owning thread.  The owning thread can go away
with the descriptor still open, for example if the opening process forks
into a background daemon and the foreground process exits.

Use the SIGIO mechanic to record the owning thread so we can detect if
the process goes away.
sys/net/tap/if_tap.c
sys/net/tap/if_tapvar.h