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

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);
}