We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0dd32cd commit 18fcc9eCopy full SHA for 18fcc9e
1 file changed
sandboxed_api/sandbox2/stack_trace.cc
@@ -194,7 +194,12 @@ absl::StatusOr<std::vector<std::string>> StackTracePeer::LaunchLibunwindSandbox(
194
// When running sandboxes concurrently, we might get a problem with sending
195
// the unotify file descriptor in the unwind sandbox, as we might exceed the
196
// maximum number of file descriptors.
197
- executor->limits()->set_rlimit_nofile(RLIM64_INFINITY);
+ rlimit64 rlim;
198
+ if (getrlimit64(RLIMIT_NOFILE, &rlim) == -1) {
199
+ PLOG(WARNING) << "getrlimit64 failed, using RLIM64_INFINITY";
200
+ rlim.rlim_cur = rlim.rlim_max = RLIM64_INFINITY;
201
+ }
202
+ executor->limits()->set_rlimit_nofile(rlim);
203
204
// Get path to the binary.
205
// app_path contains the path like it is also in /proc/pid/maps. It is
0 commit comments