Skip to content

Commit 3685a27

Browse files
committed
remove gil release
1 parent 0bdd8bc commit 3685a27

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

Modules/posixmodule.c

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8601,13 +8601,7 @@ static PyObject *
86018601
os_setns_impl(PyObject *module, int fd, int nstype)
86028602
/*[clinic end generated code: output=5dbd055bfb66ecd0 input=c097c9aa123c43ce]*/
86038603
{
8604-
int res;
8605-
8606-
Py_BEGIN_ALLOW_THREADS
8607-
res = setns(fd, nstype);
8608-
Py_END_ALLOW_THREADS
8609-
8610-
if (res != 0) {
8604+
if (setns(fd, nstype) != 0) {
86118605
return posix_error();
86128606
}
86138607

@@ -8628,13 +8622,7 @@ static PyObject *
86288622
os_unshare_impl(PyObject *module, int flags)
86298623
/*[clinic end generated code: output=1b3177906dd237ee input=f8d7bd2c69325537]*/
86308624
{
8631-
int res;
8632-
8633-
Py_BEGIN_ALLOW_THREADS
8634-
res = unshare(flags);
8635-
Py_END_ALLOW_THREADS
8636-
8637-
if (res != 0) {
8625+
if (unshare(flags) != 0) {
86388626
return posix_error();
86398627
}
86408628

0 commit comments

Comments
 (0)