46 #ifndef RC_START_STOP_H 47 #define RC_START_STOP_H 53 #define RC_PID_DIR "/run/shm/" 54 #define RC_PID_FILE "/run/shm/robotcontrol.pid" 177 #endif // RC_START_STOP_H Definition: start_stop.h:64
int rc_enable_signal_handler(void)
Enables a generic signal handler. Optional but recommended.
void rc_set_state(rc_state_t new_state)
sets the current process state.
int rc_make_pid_file(void)
Makes a PID file RC_PID_FILE (/run/shm/robotcontrol.pid) containing the current PID of your process...
rc_state_t rc_get_state(void)
fetches the current process state as set by the user or signal handler
Definition: start_stop.h:61
int rc_disable_signal_handler(void)
resets the system signal callbacks to defualt, generally this is never needed unless you are intentio...
int rc_print_state(void)
prints the process state to stdout in human-readble form
Definition: start_stop.h:62
int rc_remove_pid_file(void)
Removes the PID file created by rc_make_pid_file().
Definition: start_stop.h:63
rc_state_t
process state variable, read and modify by rc_get_state, rc_set_state, and rc_print_state. Starts as UNINITIALIZED.
Definition: start_stop.h:60
int rc_kill_existing_process(float timeout_s)
This function is used to make sure any existing program using the PID file is stopped.