You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expose PIDFD_NONBLOCK as os.PIDFD_NONBLOCK to be used with os.waitid.
Pitch
pidfd_open returns a nonblocking file descriptor if PIDFD_NONBLOCK is supplied as flag. If the process
referred to by the file descriptor has not yet terminated,
then an attempt to wait on the file descriptor using waitid(2) will immediately return the error EAGAIN rather
than blocking.
according to documentation it should be available, yet it is not there:
python3.13 Wed 04 Dec 2024 01:57:39 AM +03
Python 3.13.0 (main, Oct 8 2024, 00:00:00) [GCC 14.2.1 20240912 (Red Hat 14.2.1-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.
import os
os.PIDFD_NONBLOCK
Traceback (most recent call last):
File "", line 1, in
os.PIDFD_NONBLOCK
AttributeError: module 'os' has no attribute 'PIDFD_NONBLOCK'. Did you mean: 'EFD_NONBLOCK'?
Activity
GH-93312: Add os.PIDFD_NONBLOCK flag (#93313)
kumaraditya303 commentedon May 31, 2022
Fixed by #93313
Oleg-Deomidoff commentedon Dec 3, 2024
according to documentation it should be available, yet it is not there:
pythongh-93312: Include <sys/pidfd.h> to get PIDFD_NONBLOCK
vstinner commentedon Dec 4, 2024
Correct, something is wrong. I wrote #127593 to fix the constant.
gh-93312: Include <sys/pidfd.h> to get PIDFD_NONBLOCK (#127593)
pythongh-93312: Include <sys/pidfd.h> to get PIDFD_NONBLOCK (pythonGH…
[3.12] gh-93312: Include <sys/pidfd.h> to get PIDFD_NONBLOCK (#127593) (
[3.13] gh-93312: Include <sys/pidfd.h> to get PIDFD_NONBLOCK (GH-127593…
pythongh-93312: Include <sys/pidfd.h> to get PIDFD_NONBLOCK (python#1…