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

gh-123014: Disable pidfd API on older Android versions by mhsmith · Pull Request #124458 · python/cpython · GitHub

Repository navigation

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

Filter by extension

Filter by extension .c  (2) .h  (2) .rst  (3) All 3 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
2 changes: 1 addition & 1 deletion Doc/library/os.rst
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 @@ -4602,7 +4602,7 @@ written in Python, such as a mail server's external command delivery program.

See the :manpage:`pidfd_open(2)` man page for more details.

.. availability:: Linux >= 5.3
.. availability:: Linux >= 5.3, Android >= :func:`build-time <sys.getandroidapilevel>` API level 31
.. versionadded:: 3.9

.. data:: PIDFD_NONBLOCK
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/signal.rst
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 @@ -411,7 +411,7 @@ The :mod:`signal` module defines the following functions:

See the :manpage:`pidfd_send_signal(2)` man page for more information.

.. availability:: Linux >= 5.1
.. availability:: Linux >= 5.1, Android >= :func:`build-time <sys.getandroidapilevel>` API level 31
.. versionadded:: 3.9


Expand Down
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
@@ -0,0 +1,3 @@
:func:`os.pidfd_open` and :func:`signal.pidfd_send_signal` are now

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Do these methods need addition annotations in the docs to highlight that they're not available?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Ah right, you can write "Android (API level 31 and newer)" in "Availability" of the modified functions.

unavailable when building against Android API levels older than 31, since
the underlying system calls may cause a crash.
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.

6 changes: 3 additions & 3 deletions Modules/clinic/signalmodule.c.h

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

5 changes: 4 additions & 1 deletion 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 @@ -10121,7 +10121,10 @@ os_wait_impl(PyObject *module)
}
#endif /* HAVE_WAIT */

#if defined(__linux__) && defined(__NR_pidfd_open)

// This system call always crashes on older Android versions.
#if defined(__linux__) && defined(__NR_pidfd_open) && \
!(defined(__ANDROID__) && __ANDROID_API__ < 31)
/*[clinic input]
os.pidfd_open
pid: pid_t
Expand Down
4 changes: 3 additions & 1 deletion Modules/signalmodule.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 @@ -1299,7 +1299,9 @@ signal_pthread_kill_impl(PyObject *module, unsigned long thread_id,
#endif /* #if defined(HAVE_PTHREAD_KILL) */


#if defined(__linux__) && defined(__NR_pidfd_send_signal)
// This system call always crashes on older Android versions.
#if defined(__linux__) && defined(__NR_pidfd_send_signal) && \
!(defined(__ANDROID__) && __ANDROID_API__ < 31)
/*[clinic input]
signal.pidfd_send_signal

Expand Down

Back | FazBrowse Home | New Git URL