Skip to content

gh-161456: refresh C stack limits after setrlimit(RLIMIT_STACK) - #161459

Open
NekoAsakura wants to merge 1 commit into
python:mainfrom
NekoAsakura:gh-161456/setrlimit-stack-limits
Open

NekoAsakura wants to merge 1 commit into
python:mainfrom
NekoAsakura:gh-161456/setrlimit-stack-limits

Conversation

@NekoAsakura

@NekoAsakura NekoAsakura commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Comment thread Modules/resource.c
}
#ifdef RLIMIT_STACK
if (resource == RLIMIT_STACK) {
_Py_UpdateRecursionLimits(_PyThreadState_GET());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_Py_UpdateRecursionLimits() updated the current thread. Does setrlimit() affect the whole process and so all threads, or only the calling thread? Same question for prlimit().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants