Skip to content

Commit 9999c31

Browse files
[NFC][lldb] document Process::SetSTDIOFileDescriptor (#169849)
1 parent eb323d8 commit 9999c31

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

lldb/include/lldb/Target/Process.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2534,6 +2534,28 @@ void PruneThreadPlans();
25342534

25352535
void CalculateExecutionContext(ExecutionContext &exe_ctx) override;
25362536

2537+
/// Associates a file descriptor with the process' STDIO handling
2538+
/// and configures an asynchronous reading of that descriptor.
2539+
///
2540+
/// This method installs a ConnectionFileDescriptor for the passed file
2541+
/// descriptor and starts a dedicated read thread. If the read thread starts
2542+
/// successfully, the method also ensures that an IOHandlerProcessSTDIO is
2543+
/// created to manage user input to the process.
2544+
///
2545+
/// The descriptor's ownership is transferred to the underlying
2546+
/// ConnectionFileDescriptor.
2547+
///
2548+
/// When data is successfully read from the file descriptor, it is stored in
2549+
/// m_stdout_data. There is no differentiation between stdout and stderr.
2550+
///
2551+
/// \param[in] fd
2552+
/// The file descriptor to use for process STDIO communication. It's
2553+
/// assumed to be valid and will be managed by the newly created
2554+
/// connection.
2555+
///
2556+
/// \see lldb_private::Process::STDIOReadThreadBytesReceived()
2557+
/// \see lldb_private::IOHandlerProcessSTDIO
2558+
/// \see lldb_private::ConnectionFileDescriptor
25372559
void SetSTDIOFileDescriptor(int file_descriptor);
25382560

25392561
// Add a permanent region of memory that should never be read or written to.

0 commit comments

Comments
 (0)