File src/cmd_start.c

This will start the UBS daemons. If a specific daemon is specified on the command line, it will start that one. Otherwise, it starts all known daemons (which are known by their name, which is in the form ubs-*).


Included Files


Global Variable PROCNAME

char PROCNAME[128]
Included from include/ubs.h

Global Variable CUR_TIME

struct tm* CUR_TIME
Included from include/ubs.h

Global Variable GLOBAL

ubs_table GLOBAL
Included from include/ubs.h

Global Variable LOGLEVEL

int LOGLEVEL
Included from include/ubs.h

Global Function cmd_start()

Starts up one of the UBS modules, forking it into the background.

int cmd_start ( int cmdc, char** cmdv )

int cmd_start
Returns OK on success, NO_DIR if bin/ can't be read, or otherwise returns whatever sub_start_proc() returns.
int cmdc
Number of arguments
char** cmdv
Argument vector
Prototyped in: include/ubs-main.h
Calls: sub_help_cmd()src/cmd_help.c
  sub_start_proc()src/cmd_start.c
  closedir(), getopt(), opendir(), printf(), readdir(), strcasecmp(), strncmp()

Global Function sub_start_proc()

Subfunction to start a process, where process is considered to be in the form PREFIX/bin/NAME.

int sub_start_proc ( char* proc, int format )

int sub_start_proc
Returns OK on success, FAIL if the process is already running, NO_FORK if the process can't be exec'd.
char* proc
The process name
int format
 
Prototyped in: include/ubs-main.h
Calls: ping_pid()lib/exec_proc.c
  execlp(), exit(), fork(), printf(), signal(), snprintf()
Called by: cmd_restart()src/cmd_restart.c
  cmd_start()src/cmd_start.c