Date: Mon, 4 Aug 2008 15:01:46 GMT From: Ed Schouten <ed@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 146630 for review Message-ID: <200808041501.m74F1kDL064723@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=146630 Change 146630 by ed@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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808041501.m74F1kDL064723>