Artificial intelligent assistant

Is it necessary to disown a process for it to continue running after disconnecting? Would someone explain if & why `disown` is necessary if you wish to keep a job running even after you disconnect. I ask because every site I have visited says to use `disown` and `bg` but `bg` on its own is working for me and I'm not sure why. Is it because I haven't fully understood what `disown` is for or are there some settings somewhere that are affecting the default behavior of the `bg` command? Here's what I did: * Connected to my CentOS 6 box via SSH * Created a simple process: tar zcvf example.tar.gz ./examplepath > /dev/null 2>&1 * Suspended the job * Resumed it in background via `bg 1` * Disconnected from SSH server I then checked via FTP to see if the `.tar.gz` file was still growing in size and it was.

Processes backgrounded via `bg` or `&` will typically die under 2 scenarios:

1. The shell receives a SIGHUP
2. They try to write to a terminal which no longer exists.



Item #1 is the primary culprit when closing your terminal. However whether it happens or not depends on **how** you close your terminal. You can close it by:

1. Something like clicking the "X" in your window manager
2. You can type `exit`, `logout`, or `CTRL`+`D`.



Item #1 is the one that will result in a SIGHUP being sent. #2 does not.

So long story short, if you background a process with `bg`, and then log out with `exit`, `logout`, or `CTRL`+`D`, the process will not be killed.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 38528a213a6f1bdf4686e6302a276540