search for: close_or_nullify_fd

Displaying 1 result from an estimated 1 matches for "close_or_nullify_fd".

2019 Aug 27
1
[PATCH nbdkit] server: Try hard to maintain invariant that fds 0, 1 and 2 are always open.
...ex ebd5f66..a77d2cd 100644 --- a/common/utils/utils.h +++ b/common/utils/utils.h @@ -38,5 +38,6 @@ extern void uri_quote (const char *str, FILE *fp); extern int exit_status_to_nbd_error (int status, const char *cmd); extern int set_cloexec (int fd); extern int set_nonblock (int fd); +extern void close_or_nullify_fd (int fd); #endif /* NBDKIT_UTILS_H */ diff --git a/server/connections.c b/server/connections.c index c173df8..f57ab3e 100644 --- a/server/connections.c +++ b/server/connections.c @@ -489,7 +489,7 @@ static void raw_close (struct connection *conn) { if (conn->sockin >= 0) - close (c...