It is commonly said that "&" puts the process into background execution, but that process would be killed when terminal is closed. But from what I see, everything I sent into background was continuing to be active long after I close the terminal. For example:
$ tail -f /var/log/messages/ &
That process would continue to run, even if there are no other process under the user that launched it, and all terminals are long gone. Why is that?
Best Answer
Just a guess (this is
bash
specific): the documentation for thehuponexit
shell option saysOn my system, it does not seem to be set by default. You can check with
If the output includes
-u
, it is unset.