aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/fileio.h
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-04-17 10:33:36 +0200
committerGitHub <noreply@github.com>2018-04-17 10:33:36 +0200
commit7a13611ba2033766da8cad73f46362bd01632c2c (patch)
tree170eff47d8e67ad5e2c484697f4bd999abf9844e /src/nvim/os/fileio.h
parent48967695c441d13bc9faa8aae4bed8d6fb5bdc14 (diff)
parent387fbcd95cade4b0c037d18f404944676a59db09 (diff)
downloadrneovim-7a13611ba2033766da8cad73f46362bd01632c2c.tar.gz
rneovim-7a13611ba2033766da8cad73f46362bd01632c2c.tar.bz2
rneovim-7a13611ba2033766da8cad73f46362bd01632c2c.zip
Merge #8276 'startup: Make -s - read from stdin'
Diffstat (limited to 'src/nvim/os/fileio.h')
-rw-r--r--src/nvim/os/fileio.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/os/fileio.h b/src/nvim/os/fileio.h
index 0b55cc695f..7c53cd4f07 100644
--- a/src/nvim/os/fileio.h
+++ b/src/nvim/os/fileio.h
@@ -14,6 +14,7 @@ typedef struct {
RBuffer *rv; ///< Read or write buffer.
bool wr; ///< True if file is in write mode.
bool eof; ///< True if end of file was encountered.
+ bool non_blocking; ///< True if EAGAIN should not restart syscalls.
} FileDescriptor;
/// file_open() flags
@@ -32,6 +33,8 @@ typedef enum {
///< kFileCreateOnly.
kFileAppend = 64, ///< Append to the file. Implies kFileWriteOnly. Cannot
///< be used with kFileCreateOnly.
+ kFileNonBlocking = 128, ///< Do not restart read() or write() syscall if
+ ///< EAGAIN was encountered.
} FileOpenFlags;
static inline bool file_eof(const FileDescriptor *const fp)