fdset: set all collected fds to CLOEXEC in fdset_new_fill()

This commit is contained in:
Mike Yuan
2023-12-01 00:14:37 +08:00
parent d8da25b5d9
commit a2467ea894
4 changed files with 15 additions and 8 deletions
-2
View File
@@ -2739,8 +2739,6 @@ static int collect_fds(FDSet **ret_fds, const char **ret_error_message) {
"MESSAGE_ID=" SD_MESSAGE_CORE_FD_SET_FAILED_STR);
}
(void) fdset_cloexec(*ret_fds, true);
/* The serialization fd should have O_CLOEXEC turned on already, let's verify that we didn't pick it up here */
assert_se(!arg_serialization || !fdset_contains(*ret_fds, fileno(arg_serialization)));