def stop(self, force=False):

        if not self.is_running:
            raise errors.StateError("Program is not running")

        if force:
            if self.state.get('pid'):
                log.debug("Force killing chalmers monitor process pid=%s" % self.state.get('pid'))
                try:
                    kill_tree(self.state.get('pid'))
                except psutil.NoSuchProcess:
                    pass
            if self.state.get('child_pid'):
                log.debug("Force killing chalmers child process pid=%s" % self.state.get('child_pid'))
                try:
                    kill_tree(self.state.get('child_pid'))
                except psutil.NoSuchProcess:
                    pass
        else:
            send_action(self.name, 'terminate', timeout=self.data['stopwaitsecs'])
Stop this program
dataset/ETHPy150Open Anaconda-Platform/chalmers/chalmers/program/base.py/ProgramBase.stop