Context:
I am running a process from bash without & and any redirection i.e like ./foo. The process is running while(1) i.e it is running forever. Also, the process is ignoring SIGHUP i.e not terminating when it gets it.
When I send SIGHUP to the bash process, it also sends a SIGHUP to my process. My process, in turn, just logs the signal and keeps on doing its job.
My Understanding:
I have built my understanding of SIGHUP from the answer here. What I understand is, in my case, bash process should be blocked and not terminate.
Problem:
But it is not the case. bash process does terminate while my process keeps on. But now, instead of bash process, /lib/systemd/systemd --user becomes the new parent.
Environment and Other Details:
Linux lap-0117 5.4.0-87-generic #98~18.04.1-Ubuntu SMP Wed Sep 22 10:45:04 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux