Commit 7d129e1
committed
Don't leak extra fds into recorded processes
We are pretty good about setting CLOEXEC on most file descriptors.
However, we were missing them on the pagemap fd and the tty fd.
With lots of nested detaching, this can start filling up fd space,
which manifested as a CI failure on julia CI: JuliaLang/julia#58979
Fix this by setting CLOEXEC as appropriate and add a test to make sure
this doesn't regress.1 parent 086bb56 commit 7d129e1
5 files changed
Lines changed: 23 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
716 | 716 | | |
717 | 717 | | |
718 | 718 | | |
719 | | - | |
| 719 | + | |
720 | 720 | | |
721 | 721 | | |
722 | 722 | | |
| |||
1745 | 1745 | | |
1746 | 1746 | | |
1747 | 1747 | | |
| 1748 | + | |
1748 | 1749 | | |
1749 | 1750 | | |
1750 | 1751 | | |
| |||
2020 | 2021 | | |
2021 | 2022 | | |
2022 | 2023 | | |
2023 | | - | |
| 2024 | + | |
2024 | 2025 | | |
2025 | 2026 | | |
2026 | 2027 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
724 | 724 | | |
725 | 725 | | |
726 | 726 | | |
| 727 | + | |
727 | 728 | | |
728 | 729 | | |
729 | 730 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2993 | 2993 | | |
2994 | 2994 | | |
2995 | 2995 | | |
2996 | | - | |
| 2996 | + | |
2997 | 2997 | | |
2998 | 2998 | | |
2999 | 2999 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6538 | 6538 | | |
6539 | 6539 | | |
6540 | 6540 | | |
6541 | | - | |
| 6541 | + | |
6542 | 6542 | | |
6543 | 6543 | | |
6544 | 6544 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
0 commit comments