NAME
terminate_child_process - The routine terminates a child a process.
SYNOPSIS
#include "l/l_sys_lib.h"
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-I/home/kobus/include
-L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
void terminate_child_process(pid_t pid);
DESCRIPTION
The basic algorithm is to first check if the process is alive. If it is,
then send it SIGTERM, and give it a chance to clean up. We check up on it at
200ms intervals for a total of 2 seconds. If it is still alive, then send
it a SIGKILL. We then check up on it every 200ms until it is really dead.
The maximum wait is again set to 2 seconds.
RELATED
kjb_waitpid2, check_child, check_child2
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Kobus Barnard
DOCUMENTER
Kobus Barnard
SEE ALSO
is_interactive
,
get_user_id
,
get_group
,
kjb_get_env
,
create_system_command_process
,
kjb_system
,
kjb_system_2
,
kjb_exec
,
kjb_waitpid
,
kjb_waitpid2
,
check_child
,
check_child2
,
reset_cleanup_for_fork
,
add_cleanup_function
,
kjb_cleanup
,
kjb_cleanup_for_abort
,
kjb_optional_abort
,
kjb_abort
,
kjb_exit
,
kjb_exit_2
,
process_is_alive
,
get_idle_time
,
get_temp_file_name
,
kjb_fork