google/nsjail

how to change "max open files" value(ulimit value)?

rootgrandfather opened this issue · 2 comments

I use nsjail to run this command:"go run test.go" with environment variable GOCACHE set to "/tmp/" and it returned sunch error info:"go tool compile: pipe2: too many open files",so I want to adjust the ulimit value higher,but I can't find solution in manual,please help me?Thank you.

--rlimit_nofile inf?

RLIMIT_NOFILE
The maximum number of open file descriptors allowed for the process. This number is one greater than the maximum value that may be assigned to a newly created descriptor. (That is, it is one-based.) Any function that attempts to create a new file descriptor beyond the limit will fail with an EMFILE errno. An attempt to set the open file descriptors limit lower than that already used will result in an EINVAL errno.

https://www.ibm.com/docs/en/zos/2.3.0?topic=functions-setrlimit-control-maximum-resource-consumption

Yes,that's the answer I am finding!Thank you!And nsjail is a great project!