@classmethod
def createFromRunningProcesses(cls, programConfig):
    """
            createFromRunningProcesses - Create a Program using programConfig. scans all running processes, and returns a constructed Program if a match is found.

            @param programConfig <ProgramConfig.ProgramConfig> - The config for a program

            @return - A constructed "Program" if a match found, ootherwise None.

            Should not raise anything.
        """
    allMyPids = cls.getMyRunningPids()
    proctitleRE = programConfig.proctitle_re
    for pid in allMyPids:
        try:
            procCmdline = cls._getProcCmdline(pid)
            if programConfig.useshell is True and procCmdline['cmdline'
                ].startswith('/bin/sh -c'):
                continue
            if bool(proctitleRE.search(procCmdline['cmdline'])):
                prog = cls(programConfig.pidfile, pid, running=True, **
                    procCmdline)
                return prog
        except:
            pass
    return None
