today I observed something which probably has an easy explanation, but was quite quite unexpected from my side: I'm running CentOS (and RHEL which behaves same). I open a bash in a terminal and start any subprocess like gedit. The window opens, fine. When I do a 'ps', I can see that gedit has the bash as it's parent process which itself has the gnome-terminal as it's parent. When I then stop bash, I would expect that all child processes stop as well. But gedit keeps running and the parent changed to 1 (init)!
I tried to don't stop the shell gracefully, but kill it hard, same result. It tried killing the terminal instead of the shell, still same result. Only when I close the terminal by clicking the X button, then gedit is closed as well.
I didn't expect that behaviour. Starting gedit with nohup, I would not be surprised, but even without nohup ... why does it stay alive?
Maybe someone can shed some light and knows what's going on there. Thanks in advance!