Commit 16de2a9
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 76c3f5e commit 16de2a9
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 | |
|---|---|---|---|
| |||
7704 | 7704 | | |
7705 | 7705 | | |
7706 | 7706 | | |
7707 | | - | |
| 7707 | + | |
7708 | 7708 | | |
7709 | 7709 | | |
7710 | 7710 | | |
| |||
0 commit comments