Function rc_kill_existing_process#
Defined in File start_stop.h
Function Documentation#
-
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.
- Parameters:
timeout_s – [in] timeout period to wait for process to close cleanly, must be >=0.1
- Returns:
return values:
-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.