From 9806a4f3bb81f71c46735a2b378cb074fef6e27b Mon Sep 17 00:00:00 2001
From: Laurent Bercot
+ int open_readcoe (char const *file)
+Opens file in read-only, non-blocking mode, close-on-exec.
+Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
+
int openb_read (char const *file)
Opens file in read-only, blocking mode.
Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
+ int openb_readcoe (char const *file)
+Opens file in read-only, blocking mode, close-on-exec.
+Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
+
int open_readb (char const *file)
Opens file in read-only, blocking mode.
@@ -270,6 +282,11 @@ is set afterwards; this behaviour allows for more transparent interactions
with FIFOs.
+ int open_readbcoe (char const *file)
+Same as above, but the file is opened close-on-exec.
+
int open_excl (char const *file)
Opens file in write-only, non-blocking mode, with the
@@ -277,6 +294,13 @@ additional O_EXCL and O_CREAT flags.
Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
+ int open_exclcoe (char const *file)
+Opens file in write-only, non-blocking mode, close-on-exec, with the
+additional O_EXCL and O_CREAT flags.
+Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
+
int open_append (char const *file)
Opens file in write-only, non-blocking mode, with the
@@ -284,6 +308,13 @@ additional O_APPEND and O_CREAT flags.
Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
+ int open_appendcoe (char const *file)
+Opens file in write-only, non-blocking mode, close-on-exec, with the
+additional O_APPEND and O_CREAT flags.
+Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
+
int open_trunc (char const *file)
Opens file in write-only, non-blocking mode, with the
@@ -291,6 +322,13 @@ additional O_TRUNC and O_CREAT flags.
Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
+ int open_trunccoe (char const *file)
+Opens file in write-only, non-blocking mode, close-on-exec, with the
+additional O_TRUNC and O_CREAT flags.
+Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
+
int open_create (char const *file)
Opens file in write-only, non-blocking mode, with the
@@ -298,12 +336,25 @@ additional O_CREAT flag.
Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
+ int open_createcoe (char const *file)
+Opens file in write-only, non-blocking mode, close-on-exec, with the
+additional O_CREAT flag.
+Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
+
int open_write (char const *file)
Opens file in write-only, non-blocking mode.
Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
+ int open_writecoe (char const *file)
+Opens file in write-only, non-blocking mode, close-on-exec.
+Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
+
-- cgit v1.2.3