[Lldb-commits] [PATCH] D105732: [lldb] Update logic to close inherited file descriptors.

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 18 12:17:03 PDT 2021


JDevlieghere accepted this revision.
JDevlieghere added a comment.

Small nit about the comments, but otherwise LGTM



================
Comment at: lldb/source/Host/posix/ProcessLauncherPosixFork.cpp:160
+        // Don't close first three entries since they are
+        // stdin/stdout/stderr
+        if (fd > 2 && !info.GetFileActionForFD(fd) && fd != error_fd)
----------------
nit: Comments should be sentences ending with a period.


================
Comment at: lldb/source/Host/posix/ProcessLauncherPosixFork.cpp:167
+    } else {
+      // /proc/self/fd didn't work - trying the slow way instead
+      int max_fd = sysconf(_SC_OPEN_MAX);
----------------
nit: Same as above. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105732/new/

https://reviews.llvm.org/D105732



More information about the lldb-commits mailing list