From 19b9c881ca9fc1a4c4473047b1f9f60d7dcfe768 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Mon, 30 Apr 2018 15:34:41 +0200 Subject: [PATCH] fs: Add O_NONBLOCK --- internal/fs/const.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/internal/fs/const.go b/internal/fs/const.go index dfa6ad5f0..f5f65de8e 100644 --- a/internal/fs/const.go +++ b/internal/fs/const.go @@ -5,12 +5,13 @@ import "syscall" // Flags to OpenFile wrapping those of the underlying system. Not all flags may // be implemented on a given system. const ( - O_RDONLY int = syscall.O_RDONLY // open the file read-only. - O_WRONLY int = syscall.O_WRONLY // open the file write-only. - O_RDWR int = syscall.O_RDWR // open the file read-write. - O_APPEND int = syscall.O_APPEND // append data to the file when writing. - O_CREATE int = syscall.O_CREAT // create a new file if none exists. - O_EXCL int = syscall.O_EXCL // used with O_CREATE, file must not exist - O_SYNC int = syscall.O_SYNC // open for synchronous I/O. - O_TRUNC int = syscall.O_TRUNC // if possible, truncate file when opened. + O_RDONLY int = syscall.O_RDONLY // open the file read-only. + O_WRONLY int = syscall.O_WRONLY // open the file write-only. + O_RDWR int = syscall.O_RDWR // open the file read-write. + O_APPEND int = syscall.O_APPEND // append data to the file when writing. + O_CREATE int = syscall.O_CREAT // create a new file if none exists. + O_EXCL int = syscall.O_EXCL // used with O_CREATE, file must not exist + O_SYNC int = syscall.O_SYNC // open for synchronous I/O. + O_TRUNC int = syscall.O_TRUNC // if possible, truncate file when opened. + O_NONBLOCK int = syscall.O_NONBLOCK // don't block open on fifos etc. )