Process server start command
342839
function(app, args) {
  let serverType = args.serverType || Constants.RESERVED.MASTER;
  let serverId = args.id || app.getMaster().id;
  let mode = args.mode || Constants.RESERVED.CLUSTER;
  let masterha = args.masterha || 'false';
  let type = args.type || Constants.RESERVED.ALL;
  let startId = args.startId;

  app.set(Constants.RESERVED.MAIN, args.main, true);
  app.set(Constants.RESERVED.SERVER_TYPE, serverType, true);
  app.set(Constants.RESERVED.SERVER_ID, serverId, true);
  app.set(Constants.RESERVED.MODE, mode, true);
  app.set(Constants.RESERVED.TYPE, type, true);
  if(!!startId) {
    app.set(Constants.RESERVED.STARTID, startId, true);
  }

  if (masterha === 'true') {
    app.master = args;
    app.set(Constants.RESERVED.CURRENT_SERVER, args, true);
  } else if (serverType !== Constants.RESERVED.MASTER) {
    app.set(Constants.RESERVED.CURRENT_SERVER, args, true);
  } else {
    app.set(Constants.RESERVED.CURRENT_SERVER, app.getMaster(), true);
  }
}
811764
def _start_server(bindaddr, port, hostname, folder):
    """"""
    import asyncio
    from .httpserver import HttpProtocol
    loop = asyncio.get_event_loop()
    coroutine = loop.create_server(lambda: HttpProtocol(hostname, folder),
                                   bindaddr,
                                   port)
    server = loop.run_until_complete(coroutine)

    print('Starting server on {}'.format(server.sockets[0].getsockname()))
    try:
        loop.run_forever()
    except KeyboardInterrupt:
        pass
87168
def _StartProcessStatusRPCServer(self):
    """"""
    if self._rpc_server:
      return

    self._rpc_server = plaso_xmlrpc.XMLProcessStatusRPCServer(self._GetStatus)

    hostname = 'localhost'

    # Try the PID as port number first otherwise pick something random
    # between 1024 and 60000.
    if self._pid < 1024 or self._pid > 60000:
      port = random.randint(1024, 60000)
    else:
      port = self._pid

    if not self._rpc_server.Start(hostname, port):
      port = 0
      for _ in range(self._NUMBER_OF_RPC_SERVER_START_ATTEMPTS):
        port = random.randint(1024, 60000)
        if self._rpc_server.Start(hostname, port):
          break

        port = 0

    if not port:
      logger.error((
          'Unable to start a process status RPC server for {0!s} '
          '(PID: {1:d})').format(self._name, self._pid))
      self._rpc_server = None
      return

    self.rpc_port.value = port

    logger.debug(
        'Process: {0!s} process status RPC server started'.format(self._name))
1050773
protected function startServer(): void
    {
        $this->guardServerStarting();

        $this->process = new Process($this->prepareCommand());
        $this->process->setWorkingDirectory($this->laravelPublicPath());
        $this->process->start();
    }
759245
def launch_server():
    
    print(os.path.dirname(os.path.abspath(__file__)))
    cur_dir = os.getcwd()
    path = os.path.dirname(os.path.abspath(__file__))
    run = True
    os.chdir(path)
    os.system('python manage.py runserver --nostatic')
    os.chdir(cur_dir)
451073
public void startServer() {

    server = new Server(httpPort);
    server.setHandler(wrapHandlers());

    if (isWebSocketInClassPath()) {
      setupForWebSocket();
    }
    try {
      server.start();
      log().info("server started");

      Runtime.getRuntime().addShutdownHook(new Thread(new ShutdownRunnable()));
      
      if (useStdInShutdown) {
        // generally for use in IDE via JettyRun, Use CTRL-D in IDE console to shutdown
        BufferedReader systemIn = new BufferedReader(new InputStreamReader(System.in, "UTF-8"));
        while((systemIn.readLine()) != null) {
          // ignore anything except CTRL-D by itself
        }
        System.out.println("Shutdown via CTRL-D");
        System.exit(0);
      }

    } catch (Exception e) {
      e.printStackTrace();
      System.exit(100);
    }
  }
271515
function start() {
    proc = spawn(procCommand, procArgs, procOptions);

    var onClose = function (code) {
      if (!restarting) {
        process.exit(code);
      }
      start();
      restarting = false;
    };

    proc.on('error', function () {
      debug('restarting due error');
      restarting = true;
      proc.kill('SIGINT');
    });

    proc.on('close', onClose);
  }
171519
function start() {
  const node = process.execPath
  const daemonFile = path.join(__dirname, '../daemon')
  const startupFile = startup.getFile('hotel')

  startup.create('hotel', node, [daemonFile], common.logFile)

  // Save startup file path in ~/.hotel
  // Will be used later by uninstall script
  mkdirp.sync(common.hotelDir)
  fs.writeFileSync(common.startupFile, startupFile)

  console.log(`Started http://localhost:${conf.port}`)
}
1212444
def launch_server(message_handler, options):
    
    logger = logging.getLogger(__name__)
    if (options.debug):
        logger.setLevel(logging.DEBUG)

    if not options.monitor_port:
        logger.warning(
            "Monitoring not enabled. No monitor-port option defined.")
    else:
        threading.Thread(target=launch_monitor_server, args=(options.host, options.monitor_port, logger)).start()

    # Create the server, binding to specified host on configured port

    logger.info(
        'Starting server on host %s port %d Python version %s.%s.%s' % ((options.host, options.port) + sys.version_info[:3]))
    server = ThreadedTCPServer((options.host, options.port),
                       StreamHandler.create_handler(message_handler,
                                                    options.buffer_size,
                                                    logger))

    # Activate the server; this will keep running until you
    # interrupt the program with Ctrl-C
    try:
        server.serve_forever()
    except KeyboardInterrupt:
        logger.info("Ctrl-C, exiting...")
        os._exit(142)
843407
def start_program(self, turn_on_load=True):
        
        self.__set_buffer_start(self.CMD_START_PROG)
        self.__set_checksum()
        self.__send_buffer()
        # Turn on Load if not on
        if turn_on_load and not self.load_on:
            self.load_on = True
1157980
def start_stop(name, start, stop, data=''):
        
        return [
            Command('start_%s' % name, start, data),
            Command('stop_%s' % name, stop, data),
        ]
175671
def cmd_start(self, argv, help):
        """"""
        parser = argparse.ArgumentParser(
            prog="%s start" % self.progname,
            description=help,
        )
        instances = self.get_instances(command='start')
        parser.add_argument("instance", nargs=1,
                            metavar="instance",
                            help="Name of the instance from the config.",
                            choices=sorted(instances))
        parser.add_argument("-o", "--override", nargs="*", type=str,
                            dest="overrides", metavar="OVERRIDE",
                            help="Option to override in instance config for startup script (name=value).")
        args = parser.parse_args(argv)
        overrides = self._parse_overrides(args)
        overrides['instances'] = self.instances
        instance = instances[args.instance[0]]
        instance.hooks.before_start(instance)
        result = instance.start(overrides)
        instance.hooks.after_start(instance)
        if result is None:
            return
        instance.status()
182395
def main(port=8000, n_output=10, use_segmenter=False):
    """"""
    global n
    global use_segmenter_flag
    n = n_output
    use_segmenter_flag = use_segmenter
    logging.info("Start webserver...")
    app.run(port=port)
339018
def start(self):
        ''''''
        assert self._client is None

        logger.debug('IsolationContext[%d] starting', id(self))

        # Create the queues
        request_queue = multiprocessing.Queue()
        response_queue = multiprocessing.Queue()

        # Launch the server process
        server = Server(request_queue, response_queue)  # Do not keep a reference to this object!
        server_process = multiprocessing.Process(target=server.loop)
        server_process.start()

        # Create a client to talk to the server
        self._client = Client(server_process, request_queue, response_queue)
1277634
def start(self, wait=60, *, server_settings={}, **opts):
        """"""
        status = self.get_status()
        if status == 'running':
            return
        elif status == 'not-initialized':
            raise ClusterError(
                'cluster in {!r} has not been initialized'.format(
                    self._data_dir))

        port = opts.pop('port', None)
        if port == 'dynamic':
            port = find_available_port()

        extra_args = ['--{}={}'.format(k, v) for k, v in opts.items()]
        extra_args.append('--port={}'.format(port))

        sockdir = server_settings.get('unix_socket_directories')
        if sockdir is None:
            sockdir = server_settings.get('unix_socket_directory')
        if sockdir is None:
            sockdir = '/tmp'

        ssl_key = server_settings.get('ssl_key_file')
        if ssl_key:
            # Make sure server certificate key file has correct permissions.
            keyfile = os.path.join(self._data_dir, 'srvkey.pem')
            shutil.copy(ssl_key, keyfile)
            os.chmod(keyfile, 0o600)
            server_settings = server_settings.copy()
            server_settings['ssl_key_file'] = keyfile

        if self._pg_version < (9, 3):
            sockdir_opt = 'unix_socket_directory'
        else:
            sockdir_opt = 'unix_socket_directories'

        server_settings[sockdir_opt] = sockdir

        for k, v in server_settings.items():
            extra_args.extend(['-c', '{}={}'.format(k, v)])

        if _system == 'Windows':
            # On Windows we have to use pg_ctl as direct execution
            # of postgres daemon under an Administrative account
            # is not permitted and there is no easy way to drop
            # privileges.
            if os.getenv('ASYNCPG_DEBUG_SERVER'):
                stdout = sys.stdout
            else:
                stdout = subprocess.DEVNULL

            process = subprocess.run(
                [self._pg_ctl, 'start', '-D', self._data_dir,
                 '-o', ' '.join(extra_args)],
                stdout=stdout, stderr=subprocess.STDOUT)

            if process.returncode != 0:
                if process.stderr:
                    stderr = ':\n{}'.format(process.stderr.decode())
                else:
                    stderr = ''
                raise ClusterError(
                    'pg_ctl start exited with status {:d}{}'.format(
                        process.returncode, stderr))
        else:
            if os.getenv('ASYNCPG_DEBUG_SERVER'):
                stdout = sys.stdout
            else:
                stdout = subprocess.DEVNULL

            self._daemon_process = \
                subprocess.Popen(
                    [self._postgres, '-D', self._data_dir, *extra_args],
                    stdout=stdout, stderr=subprocess.STDOUT)

            self._daemon_pid = self._daemon_process.pid

        self._test_connection(timeout=wait)
997289
def start(self):
        
        try:
            cmd = [self.path]
            cmd.extend(self.command_line_args())
            self.process = subprocess.Popen(cmd, env=self.env,
                                            close_fds=platform.system() != 'Windows',
                                            stdout=self.log_file,
                                            stderr=self.log_file,
                                            stdin=PIPE)
        except TypeError:
            raise
        except OSError as err:
            if err.errno == errno.ENOENT:
                raise WebDriverException(
                    "'%s' executable needs to be in PATH. %s" % (
                        os.path.basename(self.path), self.start_error_message)
                )
            elif err.errno == errno.EACCES:
                raise WebDriverException(
                    "'%s' executable may have wrong permissions. %s" % (
                        os.path.basename(self.path), self.start_error_message)
                )
            else:
                raise
        except Exception as e:
            raise WebDriverException(
                "The executable %s needs to be available in the path. %s\n%s" %
                (os.path.basename(self.path), self.start_error_message, str(e)))
        count = 0
        while True:
            self.assert_process_still_running()
            if self.is_connectable():
                break
            count += 1
            time.sleep(1)
            if count == 30:
                raise WebDriverException("Can not connect to the Service %s" % self.path)
480872
def cmd_startstop(node, cmd_name, node_info):
    """"""
    cmd_lu = {"run": ["ex_start_node", "wait_until_running", "RUNNING"],
              "stop": ["ex_stop_node", "", "STOPPING"]}
    # specific delay & message {provider: {command: [delay, message]}}
    cld_lu = {"azure": {"stop": [6, "Initiated"]},
              "aws": {"stop": [6, "Initiated"]}}
    conf_mess = ("\r{0}{1}{2} {3} - Confirm [y/N]: ".
                 format(C_STAT[cmd_name.upper()], cmd_name.upper(), C_NORM,
                        node_info))
    cmd_result = None
    if input_yn(conf_mess):
        exec_mess = ("\r{0}{1}{2} {3}:  ".
                     format(C_STAT[cmd_name.upper()], cmd_lu[cmd_name][2],
                            C_NORM, node_info))
        ui_erase_ln()
        ui_print(exec_mess)
        busy_obj = busy_disp_on()  # busy indicator ON
        node_drv = getattr(node, "driver")
        main_cmd = getattr(node_drv, cmd_lu[cmd_name][0])
        response = main_cmd(node)  # noqa
        cmd_wait = cmd_lu[cmd_name][1]
        if cmd_wait:
            seccmd = getattr(node_drv, cmd_wait)
            response = seccmd([node])  # noqa
        delay, cmd_end = cld_lu.get(node.cloud,
                                    {}).get(cmd_name, [0, "Successful"])
        sleep(delay)
        busy_disp_off(busy_obj)  # busy indicator OFF
        ui_print("\033[D")  # remove extra space
        cmd_result = True
        ui_print_suffix("{0} {1}".format(cmd_name.title(), cmd_end), C_GOOD)
        sleep(1.5)
    else:
        ui_print_suffix("Command Aborted")
        sleep(0.75)
    return cmd_result