Apply r269126 to tty_timedwait():

Don't return ERESTART when the device is gone.
This commit is contained in:
Marcel Moolenaar 2014-10-09 01:59:25 +00:00
parent 511037bd43
commit 75c2b79df8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=272786

View File

@ -1392,14 +1392,14 @@ tty_timedwait(struct tty *tp, struct cv *cv, int hz)
error = cv_timedwait_sig(cv, tp->t_mtx, hz);
/* Restart the system call when we may have been revoked. */
if (tp->t_revokecnt != revokecnt)
return (ERESTART);
/* Bail out when the device slipped away. */
if (tty_gone(tp))
return (ENXIO);
/* Restart the system call when we may have been revoked. */
if (tp->t_revokecnt != revokecnt)
return (ERESTART);
return (error);
}