This is mainly the case on Centos but applies to other distros and situations. If you are running programs in the background with the &, at least in Centos it is usually not honored and if you quit or are disconnected the backgrounded programs will be sent sighup and be shut down.
The simplest way around this instead of using & is to start any programs or commands with "nohup"
Eg.
nohup yourscript.sh
centos, linux, bash, exiting, logging, shell, terminal, scripts, backgroundthis, mainly, applies, distros, programs, disconnected, backgrounded, sighup, simplest, commands, quot, nohup, eg, yourscript, sh,