Skip to content

Commit e6faebc

Browse files
authored
release gil around users()/BSD (#1425)
1 parent b316e6a commit e6faebc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

psutil/_psutil_bsd.c

+2
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,9 @@ psutil_users(PyObject *self, PyObject *args) {
802802
struct utmp ut;
803803
FILE *fp;
804804

805+
Py_BEGIN_ALLOW_THREADS
805806
fp = fopen(_PATH_UTMP, "r");
807+
Py_END_ALLOW_THREADS
806808
if (fp == NULL) {
807809
PyErr_SetFromErrnoWithFilename(PyExc_OSError, _PATH_UTMP);
808810
goto error;

0 commit comments

Comments
 (0)