Plan 9 from Bell Labs’s /usr/web/sources/patch/applied/ape-dirread/readme

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


post...
very strange bug, when doing a directory scan somtimes read(2) of the directory
returns -1 at EOF rather than zero. this confuses the ape readdir() code and so
we read off the end of the dir.

this only happens with my cifs(1) server but that uses lib9p and its dirgen()
function, which only does a respond(r, nil);.

As a result this is not really a fix but a workaround, however, I do think
its fair that the read system call could fail without causing a suicide in ape
so this change seems fair to me.

-Steve

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.