Skip to content

Commit

Permalink
release gil around users()/BSD (#1425)
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Nov 20, 2019
1 parent b316e6a commit e6faebc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions psutil/_psutil_bsd.c
Expand Up @@ -802,7 +802,9 @@ psutil_users(PyObject *self, PyObject *args) {
struct utmp ut;
FILE *fp;

Py_BEGIN_ALLOW_THREADS
fp = fopen(_PATH_UTMP, "r");
Py_END_ALLOW_THREADS
if (fp == NULL) {
PyErr_SetFromErrnoWithFilename(PyExc_OSError, _PATH_UTMP);
goto error;
Expand Down

0 comments on commit e6faebc

Please sign in to comment.