[llvm] [llvm-exegesis] Close file descriptors after use (PR #86584)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 26 16:30:27 PDT 2024


================
@@ -317,6 +317,7 @@ class SubProcessFunctionExecutorImpl
     int CounterFileDescriptor = Counter->getFileDescriptor();
     Error SendError =
         sendFileDescriptorThroughSocket(WriteFD, CounterFileDescriptor);
+    close(WriteFD);
----------------
mshockwave wrote:

should we use `make_scope_exit` to make sure this fd is closed no matter how we leave this function?

https://github.com/llvm/llvm-project/pull/86584


More information about the llvm-commits mailing list