Classes | Macros | Functions | Variables
servercntrl.cxx File Reference
#include <servercntrl.h>
#include <client_privat.h>
#include <client.h>
#include <arbdb.h>
#include <arb_file.h>
#include <arb_sleep.h>
#include <ut_valgrinded.h>
Include dependency graph for servercntrl.cxx:

Go to the source code of this file.


struct  gl_struct


#define TRIES   1


void make_async_call (char *&command)
charcreateCallOnSocketHost (const char *host, const char *remotePrefix, const char *command, SpawnMode spawnmode, const char *logfile)
GB_ERROR arb_start_server (const char *arb_tcp_env, int do_sleep)
static GB_ERROR arb_wait_for_server (const char *arb_tcp_env, const char *tcp_id, int magic_number, struct gl_struct *serverctrl, int wait)
static GB_ERROR check_server_selected (const char *arb_tcp_env)
GB_ERROR arb_look_and_start_server (long magic_number, const char *arb_tcp_env)
GB_ERROR arb_look_and_kill_server (int magic_number, const char *arb_tcp_env)
const chararb_look_and_start_ptserver (int magic_number, int ptserver_id, GB_ERROR &error)
void arb_print_server_params ()
arb_paramsarb_trace_argv (int *argc, const char **argv)
void free_arb_params (arb_params *params)


static struct gl_struct glservercntrl

Macro Definition Documentation

#define TRIES   1

Definition at line 59 of file servercntrl.cxx.

Function Documentation

void make_async_call ( char *&  command)

Definition at line 71 of file servercntrl.cxx.

References GBS_global_string_copy().

Referenced by createCallOnSocketHost().

char* createCallOnSocketHost ( const char host,
const char remotePrefix,
const char command,
SpawnMode  spawnmode,
const char logfile 

transforms a shell-command

  • use ssh if host is not local
  • add wrappers for detached execution
    hostsocket specification (may be 'host:port', 'host' or ':portOrSocketfile')
    remotePrefixprefixed to command if it is executed on remote host (e.g. "$ARBHOME/bin/" -> uses value of environment variable ARBHOME on remote host!)
    commandthe shell command to execute
    spawnmodehow to spawn: WAIT_FOR_TERMINATION = run "command" SPAWN_ASYNCHRONOUS = run "( command ) &" SPAWN_DAEMONIZED = do not forward kill signals, remove from joblist and redirect output to logfile
    logfileuse with SPAWN_DAEMONIZED (mandatory; NULp otherwise)
    a SSH system call for remote hosts and direct system calls for the local machine

Definition at line 75 of file servercntrl.cxx.

References arb_assert, ARB_strdup(), ARB_strpartdup(), GB_host_is_local(), GBK_singlequote(), GBS_global_string(), GBS_global_string_copy(), make_async_call(), make_valgrinded_call, NULp, SPAWN_ASYNCHRONOUS, SPAWN_DAEMONIZED, and WAIT_FOR_TERMINATION.

Referenced by arb_start_server(), and pd_query_pt_server().

GB_ERROR arb_start_server ( const char arb_tcp_env,
int  do_sleep 
static GB_ERROR arb_wait_for_server ( const char arb_tcp_env,
const char tcp_id,
int  magic_number,
struct gl_struct serverctrl,
int  wait 
static GB_ERROR check_server_selected ( const char arb_tcp_env)

Definition at line 227 of file servercntrl.cxx.

References NULp.

Referenced by arb_look_and_kill_server(), and arb_look_and_start_server().

GB_ERROR arb_look_and_start_server ( long  magic_number,
const char arb_tcp_env 
GB_ERROR arb_look_and_kill_server ( int  magic_number,
const char arb_tcp_env 
const char* arb_look_and_start_ptserver ( int  magic_number,
int  ptserver_id,
GB_ERROR error 
void arb_print_server_params ( void  )

Definition at line 377 of file servercntrl.cxx.

Referenced by show_help(), and usage().

arb_params* arb_trace_argv ( int argc,
const char **  argv 
void free_arb_params ( arb_params params)

Variable Documentation

struct gl_struct glservercntrl