FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-114727: Update os_{openpty|grantpt}_impl to use per module lock. by corona10 · Pull Request #117017 · python/cpython · GitHub

/ cpython Public
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (1) .h  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
13 changes: 11 additions & 2 deletions Modules/clinic/posixmodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions Modules/posixmodule.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -8419,6 +8419,7 @@ os_posix_openpt_impl(PyObject *module, int oflag)

#ifdef HAVE_GRANTPT
/*[clinic input]
@critical_section
os.grantpt

fd: fildes
Expand All @@ -8432,7 +8433,7 @@ Performs a grantpt() C function call.

static PyObject *
os_grantpt_impl(PyObject *module, int fd)
/*[clinic end generated code: output=dfd580015cf548ab input=0668e3b96760e849]*/
/*[clinic end generated code: output=dfd580015cf548ab input=c813b58c0ee7d9a0]*/
{
int ret;
int saved_errno;
Expand Down Expand Up @@ -8547,6 +8548,7 @@ os_ptsname_impl(PyObject *module, int fd)

#if defined(HAVE_OPENPTY) || defined(HAVE__GETPTY) || defined(HAVE_DEV_PTMX)
/*[clinic input]
@critical_section
os.openpty

Open a pseudo-terminal.
Expand All @@ -8557,7 +8559,7 @@ for both the master and slave ends.

static PyObject *
os_openpty_impl(PyObject *module)
/*[clinic end generated code: output=98841ce5ec9cef3c input=f3d99fd99e762907]*/
/*[clinic end generated code: output=98841ce5ec9cef3c input=49472bedd2dfaffe]*/
{
int master_fd = -1, slave_fd = -1;
#ifndef HAVE_OPENPTY
Expand Down

Back | FazBrowse Home | New Git URL