Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Doc/library/os.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4986,11 +4986,11 @@ written in Python, such as a mail server's external command delivery program.

.. availability:: Unix, not Emscripten, not WASI.

.. note::
This function is not available on macOS.

.. versionadded:: 3.3

.. versionchanged:: 3.13
This function is now available on macOS as well.


.. function:: waitpid(pid, options, /)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
:func:`os.waitid` is now available on macOS
6 changes: 3 additions & 3 deletions Modules/clinic/posixmodule.c.h

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

14 changes: 7 additions & 7 deletions Modules/posixmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ typedef struct {
PyObject *TerminalSizeType;
PyObject *TimesResultType;
PyObject *UnameResultType;
#if defined(HAVE_WAITID) && !defined(__APPLE__)
#if defined(HAVE_WAITID)
PyObject *WaitidResultType;
#endif
#if defined(HAVE_WAIT3) || defined(HAVE_WAIT4)
Expand Down Expand Up @@ -2292,7 +2292,7 @@ static PyStructSequence_Desc statvfs_result_desc = {
10
};

#if defined(HAVE_WAITID) && !defined(__APPLE__)
#if defined(HAVE_WAITID)
PyDoc_STRVAR(waitid_result__doc__,
"waitid_result: Result from waitid.\n\n\
This object may be accessed either as a tuple of\n\
Expand Down Expand Up @@ -2367,7 +2367,7 @@ _posix_clear(PyObject *module)
Py_CLEAR(state->TerminalSizeType);
Py_CLEAR(state->TimesResultType);
Py_CLEAR(state->UnameResultType);
#if defined(HAVE_WAITID) && !defined(__APPLE__)
#if defined(HAVE_WAITID)
Py_CLEAR(state->WaitidResultType);
#endif
#if defined(HAVE_WAIT3) || defined(HAVE_WAIT4)
Expand All @@ -2392,7 +2392,7 @@ _posix_traverse(PyObject *module, visitproc visit, void *arg)
Py_VISIT(state->TerminalSizeType);
Py_VISIT(state->TimesResultType);
Py_VISIT(state->UnameResultType);
#if defined(HAVE_WAITID) && !defined(__APPLE__)
#if defined(HAVE_WAITID)
Py_VISIT(state->WaitidResultType);
#endif
#if defined(HAVE_WAIT3) || defined(HAVE_WAIT4)
Expand Down Expand Up @@ -9518,7 +9518,7 @@ os_wait4_impl(PyObject *module, pid_t pid, int options)
#endif /* HAVE_WAIT4 */


#if defined(HAVE_WAITID) && !defined(__APPLE__)
#if defined(HAVE_WAITID)
/*[clinic input]
os.waitid

Expand Down Expand Up @@ -9575,7 +9575,7 @@ os_waitid_impl(PyObject *module, idtype_t idtype, id_t id, int options)

return result;
}
#endif /* defined(HAVE_WAITID) && !defined(__APPLE__) */
#endif /* defined(HAVE_WAITID) */


#if defined(HAVE_WAITPID)
Expand Down Expand Up @@ -17309,7 +17309,7 @@ posixmodule_exec(PyObject *m)
return -1;
}

#if defined(HAVE_WAITID) && !defined(__APPLE__)
#if defined(HAVE_WAITID)
waitid_result_desc.name = MODNAME ".waitid_result";
state->WaitidResultType = (PyObject *)PyStructSequence_NewType(&waitid_result_desc);
if (PyModule_AddObjectRef(m, "waitid_result", state->WaitidResultType) < 0) {
Expand Down