In a terminal I get this:
manu@work:ulimit -s
manu@work:8192
Now in a Makefile, I have
test:
echo `ulimit -s`
An running make in the same terminal gives:
manu@work:make test
manu@work:unlimited
Why ? Does the make process changes it’s own threads stack size ?
setrlimit(R_LIMIT_STACK, ...);Alternatively, Linux also providesprlimitwhich can act as eithergetlimit,setrlimit, or both.