Here are two cases when a process group in an interactive shell isn't a job of the shell:
$ sleep 100 &  16081 $ jobs + Running sleep 100 & $ disown %1 $ jobs $
$ ( sleep 200 & ) $ jobs $
How does each case achieve making a process group not a job? In interactive bash, what is the necessary and sufficient condition for a process group to be a job of the shell?
The shell is a session leader running on a pseudoterminal slave. When the shell terminates, it will not affect the two sleep processes above, since they are not in the job list of the shell so don't receive SIGHUP. Then
do the two sleep processes still have the pseduoterminal slave as their session's controlling terminal?
What can terminate the two sleep processes, besides they exit normally or are killed by
killsending a signal?
I would like to know how different in effect the two cases are from a real daemon.