
Lock the socket dir to avoid races in open_persistent_connection(). Also avoid using "ssh -f" since that may return before the socket is created. Strip carriage returns from log when running in a pty.
Lock the socket dir to avoid races in open_persistent_connection(). Also avoid using "ssh -f" since that may return before the socket is created. Strip carriage returns from log when running in a pty.