Skip to content

Expose PIDFD_NONBLOCK as os.PIDFD_NONBLOCK #93312

Closed

Description

@kumaraditya303

Feature or enhancement

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.

Linked PRs

Activity

  1. added a commit that references this issue on May 31, 2022
  2. kumaraditya303 commented on May 31, 2022

    @kumaraditya303
    ContributorAuthor

    Fixed by #93313

  3. Oleg-Deomidoff commented on Dec 3, 2024

    @Oleg-Deomidoff

    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'?

  4. added a commit that references this issue on Dec 4, 2024
  5. vstinner commented on Dec 4, 2024

    @vstinner
    Member

    AttributeError: module 'os' has no attribute 'PIDFD_NONBLOCK'

    Correct, something is wrong. I wrote #127593 to fix the constant.

  6. added a commit that references this issue on Dec 5, 2024
  7. added a commit that references this issue on Dec 5, 2024
  8. added 2 commits that reference this issue on Dec 5, 2024
  9. added a commit that references this issue on Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions