'Stop a process named by name
@param string name  The name of the process to stop (or \'group:name\')
@param boolean wait        Wait for the process to be fully stopped
@return boolean result     Always return True unless error'

def stopProcess(self, name, wait=True):

    self._update('stopProcess')
    (group, process) = self._getGroupAndProcess(name)
    if (process is None):
        (group_name, process_name) = split_namespec(name)
        return self.stopProcessGroup(group_name, wait)
    if (process.get_state() not in RUNNING_STATES):
        raise RPCError(Faults.NOT_RUNNING, name)
    msg = process.stop()
    if (msg is not None):
        raise RPCError(Faults.FAILED, msg)
    self.supervisord.reap()
    if (wait and (process.get_state() not in STOPPED_STATES)):
        def onwait():
            process.stop_report()
            if (process.get_state() not in STOPPED_STATES):
                return NOT_DONE_YET
            return True
        onwait.delay = 0
        onwait.rpcinterface = self
        return onwait
    return True
