summaryrefslogtreecommitdiffstats
path: root/src/basic/fd-util.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 10:23:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 10:23:36 +0000
commit3124284ced2903518f6d277b8c8d63ed79da47b7 (patch)
treea7e9aca4373a077d060a80c5ff9adbda67822f3f /src/basic/fd-util.c
parentReleasing progress-linux version 252.22-1~deb12u1~progress6.99u1. (diff)
downloadsystemd-3124284ced2903518f6d277b8c8d63ed79da47b7.tar.xz
systemd-3124284ced2903518f6d277b8c8d63ed79da47b7.zip
Merging upstream version 252.23.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/basic/fd-util.c')
-rw-r--r--src/basic/fd-util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/fd-util.c b/src/basic/fd-util.c
index 66bb756..ad7bd63 100644
--- a/src/basic/fd-util.c
+++ b/src/basic/fd-util.c
@@ -284,7 +284,7 @@ static int close_all_fds_special_case(const int except[], size_t n_except) {
case 0:
/* Close everything. Yay! */
- if (close_range(3, -1, 0) >= 0)
+ if (close_range(3, INT_MAX, 0) >= 0)
return 1;
if (ERRNO_IS_NOT_SUPPORTED(errno) || ERRNO_IS_PRIVILEGE(errno)) {
@@ -395,7 +395,7 @@ int close_all_fds(const int except[], size_t n_except) {
if (sorted[n_sorted-1] >= INT_MAX) /* Dont let the addition below overflow */
return 0;
- if (close_range(sorted[n_sorted-1] + 1, -1, 0) >= 0)
+ if (close_range(sorted[n_sorted-1] + 1, INT_MAX, 0) >= 0)
return 0;
if (!ERRNO_IS_NOT_SUPPORTED(errno) && !ERRNO_IS_PRIVILEGE(errno))