-
- Downloads
"tests/valgrind.sh" did not exist on "fc7cd7f61a24c2ff350f8ba6bc1d2ff81fc5c5c7"
pv-wrap, pv-adverb, pv-launcher: Set a reasonable RLIMIT_NOFILE
We could inherit any RLIMIT_NOFILE from Steam or another caller, but we want to give games a predictable execution environment. If a game uses select(), allocates memory proportional to the soft limit on file descriptors, or loops for a number of iterations proportional to the soft limit on file descriptors (as we did prior to commit 97b5a8f6 "pressure-vessel: Let short-term subprocesses inherit non-CLOEXEC fds"), then file descriptors numerically greater than 1023 are going to be a problem. If the soft limit is more than 1024 (= FD_SETSIZE), reduce it to 1024 to avoid this. Conversely, if we're launched with a soft limit strictly less than 1024, let's try to raise it to 1024 if the hard limit allows that. Signed-off-by:Simon McVittie <smcv@collabora.com>
Showing
- pressure-vessel/adverb.c 5 additions, 0 deletionspressure-vessel/adverb.c
- pressure-vessel/launcher.c 5 additions, 0 deletionspressure-vessel/launcher.c
- pressure-vessel/wrap.c 5 additions, 0 deletionspressure-vessel/wrap.c
- steam-runtime-tools/utils-internal.h 3 additions, 0 deletionssteam-runtime-tools/utils-internal.h
- steam-runtime-tools/utils.c 58 additions, 0 deletionssteam-runtime-tools/utils.c
- tests/utils.c 55 additions, 0 deletionstests/utils.c
Loading
Please register or sign in to comment