Commit e1b0445
Kristján Valur Jónsson
get_file() no longer leaks a FILE structure. If given a file descriptor, it calls dup() to get a new handle. Then both the FILE object and the fd can be closed.
This is important, because otherwise, the leaked FILE object will be closed on process exit, causing assertions on Windows, e.g. in the test_multiprocessing.py regression test.1 parent 47f27a3 commit e1b0445
1 file changed
Lines changed: 19 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3023 | 3023 | | |
3024 | 3024 | | |
3025 | 3025 | | |
3026 | | - | |
3027 | | - | |
| 3026 | + | |
| 3027 | + | |
| 3028 | + | |
| 3029 | + | |
| 3030 | + | |
| 3031 | + | |
| 3032 | + | |
| 3033 | + | |
3028 | 3034 | | |
3029 | 3035 | | |
3030 | | - | |
3031 | | - | |
3032 | | - | |
| 3036 | + | |
| 3037 | + | |
| 3038 | + | |
| 3039 | + | |
| 3040 | + | |
3033 | 3041 | | |
3034 | 3042 | | |
3035 | 3043 | | |
| |||
3051 | 3059 | | |
3052 | 3060 | | |
3053 | 3061 | | |
3054 | | - | |
3055 | | - | |
| 3062 | + | |
3056 | 3063 | | |
3057 | 3064 | | |
3058 | 3065 | | |
| |||
3081 | 3088 | | |
3082 | 3089 | | |
3083 | 3090 | | |
| 3091 | + | |
| 3092 | + | |
3084 | 3093 | | |
3085 | 3094 | | |
3086 | 3095 | | |
| |||
3105 | 3114 | | |
3106 | 3115 | | |
3107 | 3116 | | |
3108 | | - | |
3109 | | - | |
| 3117 | + | |
3110 | 3118 | | |
3111 | 3119 | | |
3112 | 3120 | | |
| |||
3150 | 3158 | | |
3151 | 3159 | | |
3152 | 3160 | | |
| 3161 | + | |
| 3162 | + | |
3153 | 3163 | | |
3154 | 3164 | | |
3155 | 3165 | | |
| |||
0 commit comments