Don't update the channel offset in pread. The pread syscall is not supposed to update the channel offset, unless when reading directories. Reference: /n/sources/patch/pread-offset Date: Tue Apr 19 20:27:56 CES 2016 Signed-off-by: djc@9grid.fr --- /sys/src/9/port/sysfile.c Tue Apr 19 20:27:51 2016 +++ /sys/src/9/port/sysfile.c Tue Apr 19 20:27:49 2016 @@ -680,10 +680,12 @@ }else nnn = nn = devtab[c->type]->read(c, p, n, off); - lock(c); - c->devoffset += nn; - c->offset += nnn; - unlock(c); + if((c->qid.type & QTDIR) || offp == nil){ + lock(c); + c->devoffset += nn; + c->offset += nnn; + unlock(c); + } poperror(); cclose(c);