镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

process.ulimit #2009

Description

@jorangreef

It would be great if there was a way for users to change ulimit explicitly from within a io.js/node.js process.

Something like process.setulimit and process.getulimit.

For users who don't understand EMFILE, it would make it easier for them to increase the limit especially on OS X without having to use an interim bash script calling ulimit before launching their script.

It would also avoid having node do something magical like reset the ulimit in the background, and it would expose more of the os capabilities to the user, which is always great.

Activity

  1. Fishrock123 commented on Jun 18, 2015

    @Fishrock123
    Contributor
  2. added
    feature requestIssues requesting new Node.js features.
    processIssues and PRs related to the process subsystem.
    on Jun 18, 2015
  3. Florian-R commented on Jun 18, 2015

    @Florian-R

    Also #1941

  4. bmeck commented on Jun 18, 2015

    @bmeck
    Member

    @jorangreef ship sailed a while ago and magical ulimit bumping is now in core. won't change anytime soon. ulimits are not directly translatable to win32 so I am hesitant to add this to core.

  5. sam-github commented on Jun 18, 2015

    @sam-github
    Contributor

    I personally would find it handy if node just had builtin a complete binding to all unix system calls, but I don't think that is really feasible, and the fact that its not portable to win32 is definitely a strike against it.

    Also, definitely fails the "can it be practically done outside of node" test: I agree, this can be done as an addon, and has been: https://www.npmjs.com/search?q=getrlimit

    -1

  6. Fishrock123 commented on Jun 19, 2015

    @Fishrock123
    Contributor

    Closing since this doesn't translate to all platforms, and is available as a npm module.

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

    feature requestIssues requesting new Node.js features.processIssues and PRs related to the process subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions