async
async copied to clipboard
Separate file reading from Foundation
File is dependent on Foundation file reading which is blocking and dependent on this line of code which as of today is known to cause infinite loops on 0 length files
Zero-byte files are not the issue, but reading virtual files (like procfs, sysfs) where stat
returns an arbitrary file size (typ. 4096), but read
can only read a few bytes before EOF. That Foundation function doesn't handle premature EOF at all.