Defined in File start_stop.h
int rc_kill_existing_process(float timeout_s)¶
This function is used to make sure any existing program using the PID file is stopped.
The user doesn’t need to integrate this in their own program However, the user may call the rc_kill example program from the command line to close whatever program is running in the background.
timeout_s – [in] timeout period to wait for process to close cleanly, must be >=0.1
-4: invalid argument or other error
-3: insufficient privileges to kill existing process
-2: unreadable or invalid contents in RC_PID_FILE
-1: existing process failed to close cleanly and had to be killed
0: No existing process was running
1: An existing process was running but it shut down cleanly.