def METHOD_NAME(self, childfp):
    reset_logging_framework()  # Must be first!
    fixup_prngs()
    mitogen.core.Latch._on_fork()
    mitogen.core.Side._on_fork()
    if self.on_fork:
        self.on_fork()
    mitogen.core.set_block(childfp.fileno())
    # Expected by the ExternalContext.main().
    os.dup2(childfp.fileno(), 1)
    os.dup2(childfp.fileno(), 100)
    # Overwritten by ExternalContext.main(); we must replace the
    # parent-inherited descriptors that were closed by Side._on_fork() to
    # avoid ExternalContext.main() accidentally allocating new files over
    # the standard handles.
    os.dup2(childfp.fileno(), 0)
    # Avoid corrupting the stream on fork crash by dupping /dev/null over
    # stderr. Instead, handle_child_crash() uses /dev/tty to log errors.
    devnull = os.open('/dev/null', os.O_WRONLY)
    if devnull != 2:
        os.dup2(devnull, 2)
        os.close(devnull)
    # If we're unlucky, childfp.fileno() may coincidentally be one of our
    # desired FDs. In that case closing it breaks ExternalContext.main().
    if childfp.fileno() not in (0, 1, 100):
        childfp.close()
    config = self.get_econtext_config()
    config['core_src_fd'] = None
    config['importer'] = self.importer
    config['setup_package'] = False
    if self.on_start:
        config['on_start'] = self.on_start
    try:
        mitogen.core.ExternalContext(config).main()
    except Exception:
        # TODO: report exception somehow.
        os._exit(72)
    finally:
        # Don't trigger atexit handlers, they were copied from the parent.
        os._exit(0)