def METHOD_NAME(self):
    """Terminate the helper."""
    stream = self.stream()
    if not self.pipe or not stream:
        return -1
    try:
        debug("tcpdump_helper terminate fd %s" % stream.fileno())
        self.pipe.METHOD_NAME()
        result = self.pipe.wait()
        if result == 124:
            # Mask valid result from timeout command.
            result = 0
        self.pipe.stdout.close()
        self.pipe = None
        return result
    except EnvironmentError as err:
        error(
            "Error closing tcpdump_helper fd %d: %s"
            % (self.pipe.stdout.fileno(), err)
        )
        return -2