summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2019-02-24 13:30:18 +0100
committerGiampaolo Rodola <g.rodola@gmail.com>2019-02-24 13:30:18 +0100
commit1ee63e51de0e3b149fc6cb70a02edefde45fdfe1 (patch)
treedab8a25a11912e11acd234f04fc66430fc19900e
parent0a30dc9dc2693ffe9aa54126eb684711d950c3f1 (diff)
downloadpsutil-release-gil.tar.gz
release gil around users()/BSDrelease-gil
-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 dce157f5..42d51b08 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_SetFromErrno(PyExc_OSError);
goto error;