'This stores the processes.'

@flow.StateHandler()
def IterateProcesses(self, responses):

    if (not responses.success):
        raise flow.FlowError(('Error    during    process    listing    %s' % responses.status))
    if self.args.fetch_binaries:
        paths_to_fetch = set()
        for p in responses:
            if (p.exe and self.args.filename_regex.Match(p.exe) and self._ConnectionStateMatch(p)):
                paths_to_fetch.add(p.exe)
        paths_to_fetch = sorted(paths_to_fetch)
        self.Log('Got    %d    processes,    fetching    binaries    for    %d...', len(responses), len(paths_to_fetch))
        self.CallFlow(file_finder.FileFinder.__name__, paths=paths_to_fetch, action=rdf_file_finder.FileFinderAction(action_type=rdf_file_finder.FileFinderAction.Action.DOWNLOAD), next_state='HandleDownloadedFiles')
    else:
        skipped = 0
        for p in responses:
            if p.exe:
                if (self._FilenameMatch(p) and self._ConnectionStateMatch(p)):
                    self.SendReply(p)
            elif self.args.connection_states:
                if self._ConnectionStateMatch(p):
                    self.SendReply(p)
            else:
                skipped += 1
        if skipped:
            self.Log(('Skipped    %s    entries,    missing    path    for    regex' % skipped))
