summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/fd-util.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/basic/fd-util.h b/src/basic/fd-util.h
index 0f5a950f1..db259e6d1 100644
--- a/src/basic/fd-util.h
+++ b/src/basic/fd-util.h
@@ -102,6 +102,10 @@ int acquire_data_fd(const void *data, size_t size, unsigned flags);
#define ERRNO_IS_DISCONNECT(r) \
IN_SET(r, ENOTCONN, ECONNRESET, ECONNREFUSED, ECONNABORTED, EPIPE, ENETUNREACH)
+/* Resource exhaustion, could be our fault or general system trouble */
+#define ERRNO_IS_RESOURCE(r) \
+ IN_SET(r, ENOMEM, EMFILE, ENFILE)
+
int fd_move_above_stdio(int fd);
int rearrange_stdio(int original_input_fd, int original_output_fd, int original_error_fd);
@@ -117,5 +121,3 @@ static inline int make_null_stdio(void) {
(fd) = -1; \
_fd_; \
})
-
-int fd_reopen(int fd, int flags);