kernel - Hack fix for tty last-close bug
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 13 Mar 2014 01:44:50 +0000 (18:44 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 13 Mar 2014 01:44:50 +0000 (18:44 -0700)
commit9724870095276ba9d57c5c1ee82c7990749b2357
tree4c1ee8291121c800de4e764757501776682891fb
parent90e9b18f8eaf9b15c56d73dbb9230a8c75d56e2d
kernel - Hack fix for tty last-close bug

* If a tty is owned by one devfs mount and programs are run which open/close
  the tty in a different devfs mount, the last-close test will get confused
  and believe that the last close in the second mount is the last close on
  the device, when the first mount still has it open.

* Temporarily hack a fix which is not SMP safe to deal with the situation.
  A proper fix requires us to put a struct lock and an opencount field in
  the struct cdev itself and use that instead of v_opencount.

* Fixes issue with 'screen' exiting when sub-processes are run inside a
  chroot (with their own /dev mount).

Reported-by: marino
sys/vfs/devfs/devfs_vnops.c