mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-02 07:43:42 +08:00
Linux 5.9 and 5.10 answer 0 instead of EAGAIN for an RWF_NOWAIT read of data that is not cached. The inline read took that 0 as end of file and ended the ReadStream early. A zero from the inline read now goes to the pool, whose read returns the data or confirms end of file; this costs one pool round trip at the end of each file. fs-stream-nowait.test.ts preloads a preadv2 shim that answers 0 for every RWF_NOWAIT read and checks that a ReadStream still reads the whole file, as Node does.