File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -124,11 +124,12 @@ grp_getgrgid_impl(PyObject *module, PyObject *id)
124
124
Py_DECREF (py_int_id );
125
125
}
126
126
#ifdef HAVE_GETGRGID_R
127
- Py_BEGIN_ALLOW_THREADS
128
127
int status ;
129
128
Py_ssize_t bufsize ;
129
+ /* Note: 'grp' will be used via pointer 'p' on getgrgid_r success. */
130
130
struct group grp ;
131
131
132
+ Py_BEGIN_ALLOW_THREADS
132
133
bufsize = sysconf (_SC_GETGR_R_SIZE_MAX );
133
134
if (bufsize == -1 ) {
134
135
bufsize = DEFAULT_BUFFER_SIZE ;
@@ -204,11 +205,12 @@ grp_getgrnam_impl(PyObject *module, PyObject *name)
204
205
if (PyBytes_AsStringAndSize (bytes , & name_chars , NULL ) == -1 )
205
206
goto out ;
206
207
#ifdef HAVE_GETGRNAM_R
207
- Py_BEGIN_ALLOW_THREADS
208
208
int status ;
209
209
Py_ssize_t bufsize ;
210
+ /* Note: 'grp' will be used via pointer 'p' on getgrnam_r success. */
210
211
struct group grp ;
211
212
213
+ Py_BEGIN_ALLOW_THREADS
212
214
bufsize = sysconf (_SC_GETGR_R_SIZE_MAX );
213
215
if (bufsize == -1 ) {
214
216
bufsize = DEFAULT_BUFFER_SIZE ;
Original file line number Diff line number Diff line change @@ -131,11 +131,12 @@ pwd_getpwuid(PyObject *module, PyObject *uidobj)
131
131
return NULL ;
132
132
}
133
133
#ifdef HAVE_GETPWUID_R
134
- Py_BEGIN_ALLOW_THREADS
135
134
int status ;
136
135
Py_ssize_t bufsize ;
136
+ /* Note: 'pwd' will be used via pointer 'p' on getpwuid_r success. */
137
137
struct passwd pwd ;
138
138
139
+ Py_BEGIN_ALLOW_THREADS
139
140
bufsize = sysconf (_SC_GETPW_R_SIZE_MAX );
140
141
if (bufsize == -1 ) {
141
142
bufsize = DEFAULT_BUFFER_SIZE ;
@@ -212,11 +213,12 @@ pwd_getpwnam_impl(PyObject *module, PyObject *name)
212
213
if (PyBytes_AsStringAndSize (bytes , & name_chars , NULL ) == -1 )
213
214
goto out ;
214
215
#ifdef HAVE_GETPWNAM_R
215
- Py_BEGIN_ALLOW_THREADS
216
216
int status ;
217
217
Py_ssize_t bufsize ;
218
+ /* Note: 'pwd' will be used via pointer 'p' on getpwnam_r success. */
218
219
struct passwd pwd ;
219
220
221
+ Py_BEGIN_ALLOW_THREADS
220
222
bufsize = sysconf (_SC_GETPW_R_SIZE_MAX );
221
223
if (bufsize == -1 ) {
222
224
bufsize = DEFAULT_BUFFER_SIZE ;
You can’t perform that action at this time.
0 commit comments