Performs a hard bounce (kill and start) for the specified process

    :Parameter unique_id: the name of the process
174187
def hard_bounce(self, unique_id, configs=None):
    
    self.kill(unique_id, configs)
    self.start(unique_id, configs)
660515
def _stop_process(p, name):
    """"""
    # Based on code in IPython.core.magics.script.ScriptMagics.shebang
    if p.poll() is not None:
        print("{} is already stopped.".format(name))
        return
    p.terminate()
    time.sleep(0.1)
    if p.poll() is not None:
        print("{} is terminated.".format(name))
        return
    p.kill()
    print("{} is killed.".format(name))
729237
def fire_running(self, running):
        '''
        
        '''
        load = {'id': self.opts['id'],
                'events': [],
                'cmd': '_minion_event'}
        for stag in sorted(
                running,
                key=lambda k: running[k].get('__run_num__', 0)):
            if running[stag]['result'] and not running[stag]['changes']:
                continue
            tag = 'state_{0}_{1}'.format(
                six.text_type(running[stag]['result']),
                'True' if running[stag]['changes'] else 'False')
            load['events'].append({
                'tag': tag,
                'data': running[stag],
            })
        channel = salt.transport.client.ReqChannel.factory(self.opts)
        try:
            channel.send(load)
        except Exception:
            pass
        finally:
            channel.close()
        return True
1146129
def terminate(self, unique_id, configs=None):
    
    self._send_signal(unique_id, signal.SIGTERM, configs)
366019
def sleep(self, unique_id, delay, configs=None):
    
    self.pause(unique_id, configs)
    time.sleep(delay)
    self.resume(unique_id, configs)
140748
protected static void destroyProcess(String pid, long sleeptimeBeforeSigkill,
                                    boolean inBackground) {
    terminateProcess(pid);
    sigKill(pid, false, sleeptimeBeforeSigkill, inBackground);
  }
259531
def process_500(self, request, exception):
        ''''''
        id_ = str(uuid.uuid4())[:6].upper()
        msg = 'Internal server error: 500. Unique error identifier is {}'
        msg = msg.format(id_)
        log.error('HTTP 500 [Message - {}]: {}'.format(id_, msg))
        log.error('HTTP 500 [Arguments - {}]: {}'.format(id_, request.args))
        log.exception('HTTP 500 [Traceback - {}]:'.format(id_))
        return msg
449653
def kill(self, signal=None):
        

        return self.client.api.kill(self.id, signal=signal)
225374
private void stopProcess(ProcessId processId) {
    SQProcess process = processesById.get(processId);
    if (process != null) {
      process.stop(1, TimeUnit.MINUTES);
    }
  }
930496
async def stop(self):
        
        # negate pid so that signals apply to process group
        pgid = -self.process.pid
        try:
            os.kill(pgid, signal.SIGTERM)
            await asyncio.sleep(1)
            os.kill(pgid, signal.SIGKILL)
        except (OSError, ProcessLookupError):
            return
355303
def kill_running_submission(self, submissionid, user_check=True):
        
        submission = self.get_submission(submissionid, user_check)
        if not submission:
            return False
        if "jobid" not in submission:
            return False

        return self._client.kill_job(submission["jobid"])
621398
def kill_container(self, container_id, signal=None):
        
        self._docker.containers.get(container_id).kill(signal)
432910
private void onCleanExit(final String processId) {
    this.onResourceStatus(
        ResourceStatusEventImpl.newBuilder()
            .setIdentifier(processId)
            .setState(State.DONE)
            .setExitCode(0)
            .build()
    );
  }
551954
def daemon_stop(pidfile, sig=None):
    
    logger.debug("stop daemon application pidfile={pidfile}.".format(pidfile=pidfile))
    pid = load_pid(pidfile)
    logger.debug("load pid={pid}".format(pid=pid))
    if not pid:
        six.print_("Application is not running or crashed...", file=os.sys.stderr)
        os.sys.exit(195)
    process_kill(pid, sig)
    return pid
860424
public void fireBeforeDynamicProcessAdded(String caseId, CaseFileInstance caseFile, long processInstanceId, String processId, Map<String, Object> parameters) {
        final Iterator<CaseEventListener> iter = getEventListenersIterator();

        if (iter.hasNext()) {
            final CaseDynamicSubprocessEvent event = new CaseDynamicSubprocessEvent(identityProvider.getName(), caseId, caseFile, processId, parameters, processInstanceId);

            do {
                iter.next().beforeDynamicProcessAdded(event);
            } while (iter.hasNext());
        }        
    }
720628
def _on_status(data, unique_id):
        
        status_code = data.get('statusCode')
        logger.info('[Subscription: %s]: %s' % (unique_id, status_code))
887825
def kill(self, procname):
        
        for proc in psutil.process_iter():
            if proc.name() == procname:
                self.info_log(
                    '[pid:%s][name:%s] killed' %
                    (proc.pid, proc.name())
                )
                proc.kill()