ARB
Classes | Enumerations | Functions
servercntrl.h File Reference
#include <arbdb_base.h>
Include dependency graph for servercntrl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  arb_params
 

Enumerations

enum  SpawnMode { WAIT_FOR_TERMINATION, SPAWN_ASYNCHRONOUS, SPAWN_DAEMONIZED }
 

Functions

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)
 
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 (void)
 
arb_paramsarb_trace_argv (int *argc, const char **argv)
 
void free_arb_params (arb_params *params)
 

Enumeration Type Documentation

enum SpawnMode
Enumerator
WAIT_FOR_TERMINATION 
SPAWN_ASYNCHRONOUS 
SPAWN_DAEMONIZED 

Definition at line 33 of file servercntrl.h.

Function Documentation

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
    Parameters
    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)
    Returns
    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 
)
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)