Constant inotify_sys::IN_NONBLOCK [] [src]

pub const IN_NONBLOCK: c_int = 2048

Flag: Set the O_NONBLOCK file status flag

The O_NONBLOCK flag changes the behavior of system calls when accessing files with mandatory locks:

By default, both traditional (process-associated) and open file description record locks are advisory. Advisory locks are not enforced and are useful only between cooperating processes.

Both lock types can also be mandatory. Mandatory locks are enforced for all processes. If a process tries to perform an incompatible access (e.g., read(2) or write(2)) on a file region that has an incompatible mandatory lock, then the result depends upon whether the O_NONBLOCK flag is enabled for its open file description. If the O_NONBLOCK flag is not enabled, then the system call is blocked until the lock is removed or converted to a mode that is compatible with the access. If the O_NONBLOCK flag is enabled, then the system call fails with the error EAGAIN.

See fcntl(2) for more details.