PERFORCE change 146630 for review
Ed Schouten
ed at FreeBSD.org
Mon Aug 4 15:01:46 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=146630
Change 146630 by ed at ed_flippo on 2008/08/04 15:01:14
Revert a bug I introduced in my previous commit:
When the timers are turned on, we should return the amount of
bytes read instead of an error when the timer expires.
While there, also fix the zombie-case on writes. According to
POSIX, we should return EIO.
Affected files ...
.. //depot/projects/mpsafetty/sys/kern/tty_ttydisc.c#7 edit
Differences ...
==== //depot/projects/mpsafetty/sys/kern/tty_ttydisc.c#7 (text+ko) ====
@@ -250,7 +250,7 @@
error = tty_timedwait(tp, &tp->t_inwait, hz);
if (error)
- return (error);
+ return (error == EWOULDBLOCK ? 0 : error);
}
return (0);
@@ -441,6 +441,9 @@
tty_lock_assert(tp, MA_OWNED);
+ if (tp->t_flags & TF_ZOMBIE)
+ return (EIO);
+
/*
* We don't need to check whether the process is the foreground
* process group or if we have a carrier. This is already done
@@ -529,6 +532,11 @@
error = tty_wait(tp, &tp->t_outwait);
if (error)
goto done;
+
+ if (tp->t_flags & TF_ZOMBIE) {
+ error = EIO;
+ goto done;
+ }
} while (oblen > 0);
}
More information about the p4-projects
mailing list