In bash, when running ( sleep 123 &), the sleep 123 process will continue running, when the subshell exits. How can I stop the sleep 123 process before its parent subshell exits?
I'm trying to see if the sleep 123 process will be terminated, because of receiving SIGHUP and SIGCONT. I am looking for an example for Is SIGHUP sent to this orphaned process, and why doesn't it terminate? and Does kernel sending SIGHUP to a process group that becomes orphaned and contains a stopped process terminate all the processes by default?