commit | 016aff77cbf5f63ed051a98ac628522a1cfd40a4 | [log] [tgz] |
---|---|---|
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | Wed Jun 06 08:57:20 2018 -0700 |
committer | GitHub <noreply@github.com> | Wed Jun 06 08:57:20 2018 -0700 |
tree | 8ec40c311c2816008dd2255e08fa66f84b8c5c61 | |
parent | 5c022f13ab6db8929e092ad035b3dc61701e3198 [diff] |
bpo-33773: Fix test.support.fd_count() on Linux/FreBSD (GH-7421) Substract one because listdir() opens internally a file descriptor to list the content of the /proc/self/fd/ directory. Add test_support.test_fd_count(). Move also MAXFD code before msvcrt.CrtSetReportMode(), to make sure that the report mode is always restored on failure. (cherry picked from commit 492d6424a7ca907c8ec1df21e51062e8f3d88e32) Co-authored-by: Victor Stinner <vstinner@redhat.com>