We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d21174 commit c2776a8Copy full SHA for c2776a8
Framework/Core/src/runDataProcessing.cxx
@@ -721,8 +721,11 @@ void spawnDevice(uv_loop_t* loop,
721
struct rlimit rlim;
722
getrlimit(RLIMIT_NOFILE, &rlim);
723
// We close all FD, but the one which are actually
724
- // used to communicate with the driver.
725
- int rlim_cur = rlim.rlim_cur;
+ // used to communicate with the driver. This is a bad
+ // idea in the first place, because rlim_cur could be huge
726
+ // FIXME: I should understand which one is really to be closed and use
727
+ // CLOEXEC on it.
728
+ int rlim_cur = std::min((int)rlim.rlim_cur, 10000);
729
for (int i = 0; i < rlim_cur; ++i) {
730
if (childFds[ref.index].childstdin[0] == i) {
731
continue;
0 commit comments