Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在终端中,我得到了这个:
manu@work:ulimit -s manu@work:8192
现在在 Makefile 中,我有
test: echo `ulimit -s`
在同一终端中运行 make 给出:
manu@work:make test manu@work:unlimited
为什么 ?make 进程是否改变了它自己的线程堆栈大小?
setrlimit(R_LIMIT_STACK, ...);或者,Linux 还提供了prlimitwhich 可以充当getlimit、setrlimit或两者。
setrlimit(R_LIMIT_STACK, ...);
prlimit
getlimit
setrlimit