File src/run_event.c

Runs an event for the ubs-event daemon. This consists of finding the event, exec'ing the event out, and sending a signal to the ubs-play daemon to let it know it has to play a special event.


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 Variable ALLEVENTS

All known events which were parsed in the configuration file

struct event* ALLEVENTS
Included from include/ubs-event.h


Global Variable EVENT

ubs_table EVENT
Included from include/ubs-event.h

Global Function run_event()

Runs an event, based on the index in the ALLEVENTS array.

int run_event ( int event_num )

int run_event
Returns OK on success, NO_FORK for forking errors, NO_FILE if the .pid file can't be opened
int event_num
The index of the ALLSHOWS array to run
Prototyped in: include/ubs-event.h
Calls: exec_proc()lib/exec_proc.c
  log_error_msg()lib/logging.c
  log_event()lib/logging.c
  __errno_location(), atoi(), fclose(), fgets(), fopen(), fork(), kill(), snprintf(), waitpid()