If the file has m_stream, it may not have a m_descriptor.
GetWaitableHandle() should call GetDescriptor(), which will call
fileno(), so it will get waitable descriptor whenever one is available.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Thanks for the fix. This sounds like it should be unit testable. Could add a test for that?
Comment Actions
Thanks for adding the test. LGTM, modulo some nits inline.
lldb/unittests/Host/CMakeLists.txt | ||
---|---|---|
14 ↗ | (On Diff #221082) | Please keep the list sorted. |
lldb/unittests/Host/FileTest.cpp | ||
29–32 ↗ | (On Diff #221082) | nit: change EXPECT_XXX to ASSERT_XXX as it does not make sense to continue the test if the assertions are not true. |