From: Philip Homburg Date: Wed, 14 Jun 2006 13:17:41 +0000 (+0000) Subject: Wake up writer when selecting for read on an empty pipe. X-Git-Tag: v3.1.3~346 X-Git-Url: http://zhaoyanbai.com/repos/man.delv.html?a=commitdiff_plain;h=221e731e45c258ea9b2a6dd95fc22776dbfd9543;p=minix.git Wake up writer when selecting for read on an empty pipe. Set fp_revived to NOT_REVIVING when decrementing reviving. --- diff --git a/servers/fs/pipe.c b/servers/fs/pipe.c index a6b68075d..cea632666 100644 --- a/servers/fs/pipe.c +++ b/servers/fs/pipe.c @@ -121,7 +121,7 @@ int notouch; /* check only */ r = SUSPEND; } /* If need be, activate sleeping writers. */ - if (susp_count > 0 && !notouch) + if (susp_count > 0) release(rip, WRITE, susp_count); } return(r); @@ -360,7 +360,10 @@ int proc_nr_e; task = -rfp->fp_task; if (rfp->fp_revived == REVIVING) + { + rfp->fp_revived = NOT_REVIVING; reviving--; + } switch (task) { case XPIPE: /* process trying to read or write a pipe */