diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2019-11-20 16:39:49 +0800 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2019-11-20 16:39:49 +0800 |
commit | 1f8d432db12a907544ac533b66a5a61ba25321fb (patch) | |
tree | 1981dae4acbc3da2bdc561fdf06975dff325708e | |
parent | 5cb1b0b526765720253fdb2e8eff0bf380bbe0a8 (diff) | |
parent | e6faebcd7adaa327d1ce57385cbebe7724d02350 (diff) | |
download | psutil-1f8d432db12a907544ac533b66a5a61ba25321fb.tar.gz |
Merge branch 'master' of github.com:giampaolo/psutil
-rw-r--r-- | psutil/_psutil_bsd.c | 2 |
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; |