Skip to content
Snippets Groups Projects
Niklas Hambüchen's avatar
Niklas Hambüchen authored
On Linux, if `fd` is a a descriptor to a regular file (on disk, a networked
filesystem, or a block device), then `O_NONBLOCK` will have no effect, yet
until now, `unsafe_read` was used which will block the running OS thread:

    | isNonBlocking fd = unsafe_read -- unsafe is ok, it can't block

With this commit, `isNonBlocking` is `False` if the file is a regular file.
f63352e2
History
Code owners
Assign users and groups as approvers for specific file changes. Learn more.