GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add more RLIMIT_* constants · Issue #137512 · python/cpython

Add more RLIMIT_* constants #137512

New issue
Copy link
New issue
Copy link
Closed
Closed
Add more RLIMIT_* constants#137512
Copy link
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-featureA feature request or enhancementA feature request or enhancement

Description

@serhiy-storchaka
serhiy-storchaka
opened on Aug 7, 2025
Issue body actions

Feature or enhancement

There are some RLIMIT_* constants on Posix platforms which are not currently exposed in the resource module.

  • RLIMIT_NTHR. Available on NetBSD >= 7.0, QNX >= 6.3.2.
  • RLIMIT_UMTXP. Available on FreeBSD >= 11.
  • RLIMIT_PIPEBUF. Available in the main branch on FreeBSD (>= 15?) >= 14.2.
  • RLIMIT_THREADS. Available on AIX. The same as RLIMIT_NTHR?
  • RLIMIT_VMEM. Available on Solaris/OpenIndiana. On FreeBSD >= 5.3 it is an alias of RLIMIT_AS.

Constants RLIM_SAVED_CUR and RLIM_SAVED_MAX are used on some platforms (Solaris/OpenIndiana, AIX) to represent values that cannot be represented in 32-bit rlim_t.

It is perhaps too early to add RLIMIT_PIPEBUF.

RLIMIT_NTHR and RLIMIT_THREADS, should we only add one of them on the corresponding platform or add both names as aliases of one other?

RLIMIT_VMEM. Should we add it as an alias of RLIMIT_AS on all other platforms?

I am not sure whether RLIM_SAVED_CUR and RLIM_SAVED_MAX are still relevant on modern Unixes. Their use is complicated. They are the part of Posix, but not defined on Linux. On FreeBSD they are aliases of RLIM_INFINITY and are not useful at all.

Linked PRs

  • gh-137512: Add new constants in the resource module #137513

Activity

  1. serhiy-storchaka
    added
    type-featureA feature request or enhancementA feature request or enhancement
    3.15bugs and security fixesbugs and security fixes
    on Aug 7, 2025
  2. serhiy-storchaka commented on Aug 7, 2025

    @serhiy-storchaka
    serhiy-storchaka
    on Aug 7, 2025
    MemberAuthor
    More actions

    On other look, RLIMIT_NTHR and RLIMIT_THREADS are different. The former is per user and the latter is per process.

  3. serhiy-storchaka commented on Aug 7, 2025

    @serhiy-storchaka
    serhiy-storchaka
    on Aug 7, 2025
    MemberAuthor
    More actions

    Ah, RLIMIT_VMEM was already added.

  4. serhiy-storchaka
    added 2 commits that reference this issue on Aug 7, 2025

    pythongh-137512: Add new constants in the resource module

    82f9a11

    pythongh-137512: Add new constants in the resource module

    7428fd4
  5. StanFromIreland
    added
    extension-modulesC modules in the Modules dirC modules in the Modules dir
    on Aug 7, 2025
  6. serhiy-storchaka
    added a commit that references this issue on Aug 7, 2025

    pythongh-137512: Add new constants in the resource module

    71671f0
  7. picnixz
    removed
    3.15bugs and security fixesbugs and security fixes
    on Aug 8, 2025
  8. encukou
    added a commit that references this issue on Aug 19, 2025

    gh-137512: Add new constants in the resource module (GH-137513)

    6e2b9a2
  9. serhiy-storchaka commented on Aug 19, 2025

    @serhiy-storchaka
    serhiy-storchaka
    on Aug 19, 2025
    MemberAuthor
    More actions

    As was pointed by @encukou, RLIM_SAVED_CUR and RLIM_SAVED_MAX are defined on Linux too as aliases of RLIM_INFINITY. They are a part of Posix, so should be defined everywhere (but may be useless).

  10. serhiy-storchaka
    closed this as completedon Aug 19, 2025
  11. encukou commented on Aug 19, 2025

    @encukou
    encukou
    on Aug 19, 2025
    Member
    More actions

    I did edit the message. The PR does add docs (and tests) for RLIMIT_PIPEBUF, and make other docs fixes.

  12. Agent-Hellboy
    added a commit that references this issue on Aug 19, 2025

    pythongh-137512: Add new constants in the resource module (pythonGH-1…

    70f819d
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

    extension-modulesC modules in the Modules dirC modules in the Modules dirtype-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.