In order for a process to survive its parent shell's exiting, what necessary and sufficient conditions does the process need to meet?
Specifically considering signals, what signals should be ignored by the process or not sent to the process?
nohupmakes a process ignore only SIGHUP, not SIGTERM? (
disownseems to avoid the parent shell sending any signal to the process)
Terminal generated signals, such as SIGINT, SIGQUIT, SIGTSTP, SIGTTIN, SIGTTOU?
&(background) don't disconnect a process from its controlling terminal. (
nohupcan disconnect a process from its controlling terminal).
Besides signals, are there other necessary conditions in other aspects than signals?
How do you make a process survive its parent shell's exiting, given the conditions above?
Is the task of making a process survive its parent shell's exiting same as the task of changing the parent of the process?
In bash shell and basic utilities (e.g. coreutils), are
nohupthe only two ways to change the parent shell process of a process? Does the parentage change happens when the shell exits?