Do not leave VCTTYISOPEN set if our attempt to open /dev/tty fails, otherwise
authorMatthew Dillon <dillon@dragonflybsd.org>
Sat, 29 Jan 2005 05:48:17 +0000 (05:48 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sat, 29 Jan 2005 05:48:17 +0000 (05:48 +0000)
commit9e08e2dd30cf27f6aec0539b63dfa7ddb14fb0a7
tree3f907c5b8174b665d2ab2486bbe905d2eff24f75
parentcff5d06a1d4a01a0072370537292297292b6b790
Do not leave VCTTYISOPEN set if our attempt to open /dev/tty fails, otherwise
we will close the controlling terminal on exit even though we didn't open it.

This case occurs when a jailed shell is created because /dev/tty cannot be
opened in that case.

Reported-by: "Simon 'corecode' Schubert" <corecode@fs.ei.tum.de>
sys/kern/tty_tty.c