What is the reason why the Android parent process is forced to kill, the child process? How to solve it at the system level?

on Android 4.4, the child process is created by the parent process. According to the process id, the child process manually kill the parent process, but the child process is still running and is not killed. As a result, the child process is not re-created when the parent process is pulled up again. How to deal with it at the system level and kill the child process when the parent process dies at the same time.


put aside Android,

in linux, it is too normal for child processes to run after the parent process exits (is there anything special about Android?). If it is necessary to kill the child process when the parent process dies, the child process can use prctl to finish

.
prctl(PR_SET_PDEATHSIG, SIGKILL); 
Menu