Commit bab4fe3
os.dup2() tests for dup3() system call availability at runtime,
but doesn't remember the result across calls, repeating
the test on each call with inheritable=False.
Since the caller of os.dup2() is expected to hold the GIL,
fix this by making the variable holding the test result static.
(cherry picked from commit b3caf38)
Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
1 parent a3d6c1b commit bab4fe3
2 files changed
Lines changed: 3 additions & 1 deletion
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8016 | 8016 | | |
8017 | 8017 | | |
8018 | 8018 | | |
8019 | | - | |
| 8019 | + | |
8020 | 8020 | | |
8021 | 8021 | | |
8022 | 8022 | | |
| |||
0 commit comments