Fix quitting legacy debugger with ^C (without coredump)
Summary:
Make DebuggerThriftBuffer::close close the SocketData m_socket without trying to allocate heap memory for a Socket; this (plus the RDS_LOCAL removal in the stack below) makes it work in a signal handler context.
Make the legacy debugger's signal handler stop throwing exceptions, instead just closing all connections and setting the m_stopped bit. Also make the client run loop check the m_stopped bit when the connection to the server has gone away (instead of blindly trying to reconnect) and if it's true have it exit the client run loop by throwing DebuggerClientExitException (on the appropriate thread this time).
Finally, make the legacy debugger's signal handler unregister itself if it's shutting down the debugger, so that a further ^C can be handled by the kernel (and kill the script being debugged if it's still trying to run).
Reviewed By: ricklavoie
Differential Revision:
D38837098
fbshipit-source-id:
a92e9eff9850dfc413c7a9953fdb570de51d23b4