code: def write_main_socket(c):
      
      the_stdin_thread.socket_write.send(c)
      while True:
          try:
              the_stdin_thread.socket_write.recv(1)
          except socket.error as e:
              if e.errno != errno.EINTR:
                  raise
          else:
              break
docs: Synchronous write to the main socket, wait for ACK