Skip to content

Add more RLIMIT_* constants #137512

@serhiy-storchaka

Description

@serhiy-storchaka

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?).
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions