Commit b3caf38
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.
1 parent 6240917 commit b3caf38
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