1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-04 09:09:56 +00:00

Give up on a tty if opening it's special file returns ENOENT like we do for

ENXIO.

Glanced at by:	imp, gallatin
This commit is contained in:
John Baldwin 2002-09-27 16:02:28 +00:00
parent 2420b40463
commit 60d6cc883c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104034

View File

@ -939,7 +939,7 @@ new_session(session_t *sprev, int session_index, struct ttyent *typ)
* then don't add the device to the session list.
*/
if ((fd = open(sp->se_device, O_RDONLY | O_NONBLOCK, 0)) < 0) {
if (errno == ENXIO) {
if (errno == ENXIO || errno == ENOENT) {
free_session(sp);
return (0);
}