diff options
author | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-06-09 19:02:01 +0300 |
---|---|---|
committer | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-06-09 19:02:01 +0300 |
commit | 4a29d649866ff133e0b8f8a1009e1000a44d7279 (patch) | |
tree | 547229aded91b3760628c646a144af604f1c3e2b /contrib/tools/python3/src/Python/fileutils.c | |
parent | 782f2445a283aed9a66e699137b3349af1689c29 (diff) | |
download | ydb-4a29d649866ff133e0b8f8a1009e1000a44d7279.tar.gz |
intermediate changes
ref:478170c7a5a1c0788ddd0d6513ce4ed86d7d7c99
Diffstat (limited to 'contrib/tools/python3/src/Python/fileutils.c')
-rw-r--r-- | contrib/tools/python3/src/Python/fileutils.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/tools/python3/src/Python/fileutils.c b/contrib/tools/python3/src/Python/fileutils.c index c3144ee407..3b53baa00e 100644 --- a/contrib/tools/python3/src/Python/fileutils.c +++ b/contrib/tools/python3/src/Python/fileutils.c @@ -2395,10 +2395,11 @@ _Py_closerange(int first, int last) first = Py_MAX(first, 0); _Py_BEGIN_SUPPRESS_IPH #ifdef HAVE_CLOSE_RANGE - if (close_range(first, last, 0) == 0 || errno != ENOSYS) { - /* Any errors encountered while closing file descriptors are ignored; - * ENOSYS means no kernel support, though, - * so we'll fallback to the other methods. */ + if (close_range(first, last, 0) == 0) { + /* close_range() ignores errors when it closes file descriptors. + * Possible reasons of an error return are lack of kernel support + * or denial of the underlying syscall by a seccomp sandbox on Linux. + * Fallback to other methods in case of any error. */ } else #endif /* HAVE_CLOSE_RANGE */ |