Someone told me that when you killed a parent process in linux, the child would die.
But I doubt it. So I wrote two bash scripts, where father.shwould invoke child.sh
Here is my script:

Now I run bash father.sh, you could check it ps -alf

Then I killed the father.sh by kill -9 24588, and I guessed the child process should be terminated but unfortunately I was wrong.

Could anyone explain why?
thx
No, when you kill a process alone, it will not kill the children.
You have to send the signal to the process group if you want all processes for a given group to receive the signal
For example, if your parent process id has the code 1234, you will have to specify the parentpid adding the symbol minus followed by your parent process id:
Otherwise, orphans will be linked to
init, as shown by your third screenshot (PPID of the child has become 1).