]> Zhao Yanbai Git Server - minix.git/commitdiff
Broken pipes fix
authorTomas Hruby <tom@minix3.org>
Thu, 24 Sep 2009 16:03:25 +0000 (16:03 +0000)
committerTomas Hruby <tom@minix3.org>
Thu, 24 Sep 2009 16:03:25 +0000 (16:03 +0000)
- fix for the broken partial pipes r/w operations

servers/vfs/main.c

index 8b47583c7bb57584a8532318ef3b85483055b315..dc6143a6d17c26e117e239e6d9854e0e80358618 100644 (file)
@@ -238,6 +238,7 @@ PRIVATE void get_work()
        /* Revive a suspended process. */
        for (rp = &fproc[0]; rp < &fproc[NR_PROCS]; rp++) 
                if (rp->fp_pid != PID_FREE && rp->fp_revived == REVIVING) {
+                       int blocked_on = rp->fp_blocked_on;
                        found_one= TRUE;
                        who_p = (int)(rp - fproc);
                        who_e = rp->fp_endpoint;
@@ -255,7 +256,7 @@ PRIVATE void get_work()
                         */
                        assert(!GRANT_VALID(rp->fp_grant));
 
-                       if (rp->fp_blocked_on == FP_BLOCKED_ON_PIPE)
+                       if (blocked_on == FP_BLOCKED_ON_PIPE)
                        {
                                fp= rp;
                                fd_nr= (rp->fp_fd >> 8);