In activate, it is important that we close the fds. In other cases, meh.
except[fd] = fd;
log_close();
- close_all_fds(except, 3 + n);
+ r = close_all_fds(except, 3 + n);
+ if (r < 0)
+ return log_error_errno(r, "Failed to close all file descriptors: %m");
}
/** Note: we leak some fd's on error here. I doesn't matter
log_close();
/* Make sure nobody waits for us on a socket anymore */
- close_all_fds(NULL, 0);
+ (void) close_all_fds(NULL, 0);
sync();
if (rearrange_stdio(-1, pipe_fds[1], -1) < 0)
_exit(EXIT_FAILURE);
- close_all_fds(NULL, 0);
+ (void) close_all_fds(NULL, 0);
(void) rlimit_nofile_safe();
reset_all_signal_handlers();
log_close();
- close_all_fds(NULL, 0);
+ (void) close_all_fds(NULL, 0);
log_open();
/* Flush out /proc/self/environ, so that we don't leak the environment from the host into the container. Also,