Called when the process has stopped.

        :param returncode: Process returncode
967092
def _termination_callback(self, returncode):
        

        log.info("uBridge process has stopped, return code: %d", returncode)
        if returncode != 0:
            self._project.emit("log.error", {"message": "uBridge process has stopped, return code: {}\n{}".format(returncode, self.read_stdout())})
896191
def stop(self):
        

        yield from self._stop_ubridge()
        if self.is_running():
            self._terminate_process()
            if self._process.returncode is None:
                try:
                    yield from wait_for_process_termination(self._process, timeout=3)
                except asyncio.TimeoutError:
                    if self._process.returncode is None:
                        try:
                            self._process.kill()
                        except OSError as e:
                            log.error("Cannot stop the VPCS process: {}".format(e))
                        if self._process.returncode is None:
                            log.warn('VPCS VM "{}" with PID={} is still running'.format(self._name, self._process.pid))

        self._process = None
        self._started = False
        yield from super().stop()
249485
private void checkReturnValue(Decl.FunctionOrMethod d, Environment last) {
		if (d.match(Modifier.Native.class) == null && last != FlowTypeUtils.BOTTOM && d.getReturns().size() != 0) {
			// In this case, code reaches the end of the function or method and,
			// furthermore, that this requires a return value. To get here means
			// that there was no explicit return statement given on at least one
			// execution path.
			syntaxError(d, MISSING_RETURN_STATEMENT);
		}
	}
1055489
def close(self, code=None):
        '''
        '''
        code = code or 1000
        body = pack('!H', code)
        body += self._close_codes.get(code, '').encode('utf-8')
        return self.encode(body, opcode=0x8)
660934
def write(self, data):
        

        self._process.poll()
        if self._process.returncode is not None:
            raise EOFError('Process ended')
        self._process.stdin.write(data)
248614
def on_container_die(exit_code: )
      cancel_restart_timers
      return unless @service_pod.running?

      # backoff restarts
      backoff = @restarts ** 2
      backoff = max_restart_backoff if backoff > max_restart_backoff
      info "#{@service_pod} exited with code #{exit_code}, restarting (delay: #{backoff}s)"

      log_service_pod_event("service:instance_crash",
        "service #{@service_pod} instance exited with code #{exit_code}, restarting (delay: #{backoff}s)",
        Logger::WARN
      )

      ts = Time.now.utc
      @restarts += 1
      @restart_backoff_timer = after(backoff) {
        debug "restart triggered (from #{ts})"
        apply
      }
    end
564957
def ending_long_process(self, message=""):
        
        QApplication.restoreOverrideCursor()
        self.show_message(message, timeout=2000)
        QApplication.processEvents()
797554
private function _processReturn() {
		// If not an empty return (no value before the semicolon)
		if (!$this->tokenizer->checkNextValidToken(T_SEMICOLON)) {
			// Remember that the current function does return something (for PHPDoc)
			$this->_functionReturns = true;
		}

		// Search for unused code after the return
		$this->_checkUnusedCode('RETURN');
	}
257395
private void exit(int errorCode) {

        try {
            m_remoteShell.end();
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.exit(errorCode);
    }
266351
def _finish(self):
        
        if self._process.returncode is None:
            self._process.stdin.flush()
            self._process.stdin.close()
            self._process.wait()
            self.closed = True
94196
function (done) {
      if (called) return;

      called = true;

      // wait for req events to fire
      process.nextTick(function() {
        if (waitend && req.readable) {
          // dump rest of request
          req.resume();
          req.once('end', done);
          return;
        }

        done();
      });
    }
318484
private void processIntegerReturn() {
        if ((sawConstant == null) && (stack.getStackDepth() == 0)) {
            throw new StopOpcodeParsingException();
        }

        Integer returnValue = null;
        if (sawConstant == null) {
            OpcodeStack.Item item = stack.getStackItem(0);
            returnValue = (Integer) item.getConstant();
        } else {
            returnValue = sawConstant;
        }

        if (returnValue == null) {
            throw new StopOpcodeParsingException();
        }
        int v = returnValue.intValue();
        if (v < 0) {
            seenNegative = true;
            if (getPC() > furthestBranchTarget) {
                seenUnconditionalNonZero = true;
            }
        } else if (v > 0) {
            seenPositive = true;
            if (getPC() > furthestBranchTarget) {
                seenUnconditionalNonZero = true;
            }
        } else {
            seenZero = true;
        }

        sawConstant = null;
    }
1048891
def exit(self, code=0, message=None):
        

        ## If we have a parser, use it to exit
        if self._parser:
            if code > 0:
                self.parser.error(message)
            else:
                self.parser.exit(code, message)

        ## Else we are exiting before parser creation
        else:
            if message is not None:
                if code > 0:
                    sys.stderr.write(message)
                else:
                    sys.stdout.write(message)
            sys.exit(code)

        ## If we're here we didn't exit for some reason?
        raise Exception("Unable to exit the %s" % self.__class__.__name__)
511565
def _on_process_started(self):
        
        comm('backend process started')
        if self is None:
            return
        self.starting = False
        self.running = True
940214
def restart_process(self, pid):
        '''
        
        '''
        if self._restart_processes is False:
            return
        log.info(
            'Process %s (%s) died with exit status %s, restarting...',
            self._process_map[pid]['tgt'],
            pid,
            self._process_map[pid]['Process'].exitcode
        )
        # don't block, the process is already dead
        self._process_map[pid]['Process'].join(1)

        self.add_process(self._process_map[pid]['tgt'],
                         self._process_map[pid]['args'],
                         self._process_map[pid]['kwargs'])

        del self._process_map[pid]
60577
def _on_process_finished(self):
        
        exit_code = self._process.exitCode()
        if self._process.exitStatus() != self._process.NormalExit:
            exit_code = 139
        self._formatter.append_message('\x1b[0m\nProcess finished with exit code %d' % exit_code,
                                       output_format=OutputFormat.CustomFormat)
        self.setReadOnly(True)
        self.process_finished.emit()
1068850
def exit(exit_code=0):
  
  """
  core.processExitHooks()

  if state.isExitHooked and not hasattr(sys, 'exitfunc'): # The function is called from the exit hook
    sys.stderr.flush()
    sys.stdout.flush()
    os._exit(exit_code) #pylint: disable=W0212

  sys.exit(exit_code)