aboutsummaryrefslogtreecommitdiff
path: root/src/fd_util.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-08 21:38:52 +0100
committerMax Kellermann <max@duempel.org>2009-11-08 21:38:52 +0100
commit5479ed7cfb012710ddcd2f8ae6a8a29bea4a9b46 (patch)
treef96dd0b2e6da3b627f96bcf7620f572576f31172 /src/fd_util.h
parentcac63bfd2125b898b26b658116534ef1e1785b6c (diff)
fd_util: added API documentation
Diffstat (limited to 'src/fd_util.h')
-rw-r--r--src/fd_util.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/fd_util.h b/src/fd_util.h
index 64eb0c85..145941d3 100644
--- a/src/fd_util.h
+++ b/src/fd_util.h
@@ -32,21 +32,45 @@
struct sockaddr;
+/**
+ * Wrapper for open(), which sets to CLOEXEC flag (atomically if
+ * supported by the OS).
+ */
int
open_cloexec(const char *path_fs, int flags);
+/**
+ * Wrapper for creat(), which sets to CLOEXEC flag (atomically if
+ * supported by the OS).
+ */
int
creat_cloexec(const char *path_fs, int mode);
+/**
+ * Wrapper for pipe(), which sets to CLOEXEC flag (atomically if
+ * supported by the OS).
+ */
int
pipe_cloexec(int fd[2]);
+/**
+ * Wrapper for socket(), which sets to CLOEXEC flag (atomically if
+ * supported by the OS).
+ */
int
socket_cloexec(int domain, int type, int protocol);
+/**
+ * Wrapper for accept(), which sets to CLOEXEC flag (atomically if
+ * supported by the OS).
+ */
int
accept_cloexec(int fd, struct sockaddr *address, size_t *address_length_r);
+/**
+ * Wrapper for inotify_init(), which sets to CLOEXEC flag (atomically
+ * if supported by the OS).
+ */
int
inotify_init_cloexec(void);