def METHOD_NAME(self):
    self.errpipe_read, errpipe_write = os.pipe()
    self.pid, self.child_fd = pty.fork()
    if self.pid == 0:
        # We're the child
        # Warning! There are potential race conditions if a signal is
        # received (or maybe other things happen) before the execvpe call
        # replaces python state...
        # prevent server's finally block from running in the event of an
        # early signal:
        config.set("pidfile", None)
        # replace server's signal handling:
        def handle_signal(signal, f):
            sys.exit(0)
        signal.signal(1, handle_signal)
        # Set window size
        cols, lines = self.get_terminal_size()
        s = struct.pack("HHHH", lines, cols, 0, 0)
        fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, s)
        os.close(self.errpipe_read)
        os.dup2(errpipe_write, 2)
        # Make sure not to retain any files from the parent
        max_fd = resource.getrlimit(resource.RLIMIT_NOFILE)[0]
        for i in range(3, max_fd):
            try:
                os.close(i)
            except OSError:
                pass
        # And exec
        env            = dict(os.environ)
        env.update(self.env_vars)
        env["COLUMNS"] = str(cols)
        env["LINES"]   = str(lines)
        env["TERM"]    = "linux"
        if self.game_cwd:
            os.chdir(self.game_cwd)
        try:
            os.execvpe(self.command[0], self.command, env)
        except OSError:
            sys.exit(1)
    # We're the parent
    os.close(errpipe_write)
    if not self.ttyrec:
        self.desc = "TerminalRecorder (fd %d)" % self.child_fd
    IOLoop.current().add_handler(self.child_fd,
                                 self._handle_read,
                                 IOLoop.ERROR | IOLoop.READ)
    IOLoop.current().add_handler(self.errpipe_read,
                                 self._handle_err_read,
                                 IOLoop.READ)