summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2019-11-20 14:38:07 +0800
committerGitHub <noreply@github.com>2019-11-20 14:38:07 +0800
commite6faebcd7adaa327d1ce57385cbebe7724d02350 (patch)
tree5e652d7194de311552a54d1fa63f7ecd5a4c531b
parentb316e6ae32870e3c69ff06ff13097788ee4d250c (diff)
downloadpsutil-e6faebcd7adaa327d1ce57385cbebe7724d02350.tar.gz
release gil around users()/BSD (#1425)
-rw-r--r--psutil/_psutil_bsd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/psutil/_psutil_bsd.c b/psutil/_psutil_bsd.c
index e07ddcc1..723d6198 100644
--- a/psutil/_psutil_bsd.c
+++ b/psutil/_psutil_bsd.c
@@ -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;