aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-01-02 23:32:43 +0000
committerEd Schouten <ed@FreeBSD.org>2009-01-02 23:32:43 +0000
commit916501c81c4668173662276f3b19cf43e277ad00 (patch)
tree4b704e6faa5e9f5a86ed54b5205e41818b2e2cc0 /sys
parenta42ea597ff783504f7ccfc7f2049dc85c354ec4a (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/tty.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index adf24b5631a0..d1ed02fd657d 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -308,6 +308,13 @@ ttydev_close(struct cdev *dev, int fflag, int devtype, struct thread *td)
{
struct tty *tp = dev->si_drv1;
+ /*
+ * Don't actually close the device if it is being used as the
+ * console.
+ */
+ if (strcmp(dev_console_filename, tty_devname(tp)) == 0)
+ return (0);
+
tty_lock(tp);
/*