[Lldb-commits] [PATCH] Allow multiple simultaneous connections to platform.
flackr at gmail.com
Tue Mar 24 05:54:17 PDT 2015
In http://reviews.llvm.org/D8452#145735, @clayborg wrote:
> I don't see how this does multiple connections? Seems like the do/while loop would need to be in a thread?
The key change in this patch is a call to fork() (line 288) to create a new process to handle each connection. The do/while continues on the parent (line 291) immediately listens for new connections (without ever closing the listen socket) while the child process inherits the accepted socket (children_inherit_accept_socket == true), handling it with GDBRemoteCommunicationPlatform and then terminates.
The parent process can then accept as many new connections as it wants forking off a new child process to handle each one.
More information about the lldb-commits